Respondida
How to find the point of intersection between three planes in MATLAB
If you don't have a point on the third plane, your problem is mathematically kind of a linear system of three equations in four ...

alrededor de 3 años hace | 0

Respondida
How to calculate real probability of data
Usually, one assumes that the underlying distribution for the realizations in A is continuous. This implies that each element in...

alrededor de 3 años hace | 2

Respondida
What can I do?
y(i,n) = 2*y(i, n-1) -y(i, n-2)+ (c*At/Ax)^2*(y(i+1, n-1)-2*y(i,n-1)+ y(i-1,n-1)); For n = 2 and i = 2, you try to access y(2,0...

alrededor de 3 años hace | 0

| aceptada

Respondida
converting matlab expression into a symbolic expression
syms x y z r R eqn = z == x^2/(2*r) + x^4/(8*r^3) + x^6/(16*r^5) + y^2/(2*R) + y^4/(8*R^3) + y^6/(16*R^5)

alrededor de 3 años hace | 1

| aceptada

Respondida
plotting variables within function
Recalculate Fwx from the solution (see above).

alrededor de 3 años hace | 0

Respondida
how can i decoupling this system of equation? and solve it by ode.
This is a linear system of equations in theta1_dotdot and theta2_dotdot. Solve it explicitly for theta1_dotdot and theta2_dotdo...

alrededor de 3 años hace | 1

| aceptada

Respondida
Function optimization meeting conditions
ht = rand(401,51); [n,m]=size(ht); I=@(h) sum(sum((ht-h).^2)); h0 = zeros(1,m); v1 = ones(m,1); w1 = -ones(m-1,1); A1 = di...

alrededor de 3 años hace | 0

| aceptada

Respondida
define condition of the matrix
syms epsilon digits(100) A = [sym('1') sym('1')-epsilon;-sym('1') sym('1')+epsilon]; C1 = cond(A,1); C2 = cond(A,2); Cinf =...

alrededor de 3 años hace | 1

Respondida
I need a MATLAB simulation for the below second order differential equation
The example "Solve Second-Order BVP" under https://uk.mathworks.com/help/matlab/ref/bvp4c.html tells you exactly how to procee...

alrededor de 3 años hace | 0

Respondida
Solve Equation with symbolic Constants numerically.
syms w a b positive real u = a * w^3/(exp(b*w)-1); du = diff(u,w); wsol = solve(du==0,w)

alrededor de 3 años hace | 0

| aceptada

Respondida
Problem writing a summation expression
Either you use "sum" or you make a loop over j. If you don't manage to get C_1, this is an indication that you should visit MAT...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to minimize the maximum error?
By a "linear approximating function" you mean a function l with l(x1,x2,x3) = a + b*x1 + c*x2 + d*x3 where a, b, c and d are ...

alrededor de 3 años hace | 0

| aceptada

Respondida
can someone help me regarding my code and error?
Adjust the sizes of the arrays involved in the calculation of "baseStationThroughputs" (see above). Further, use "fcn2optimexpr...

alrededor de 3 años hace | 0

Respondida
Problems related to initial and boundary conditions for solving PDE
This function sets adiabatic boundary conditions at both ends. function [pl,ql,pr,qr] = heatbc(xl,ul,xr,ur,t) pl = 0;%ul-293...

alrededor de 3 años hace | 0

| aceptada

Respondida
Underdetermined Constrained Nonlinear System of Equations
My guess is that the x below is one of many other solutions. A = [1 1 1 1 1 1;-0.52 -0.52 0.3 0.3 0.64 0.64;0.94 -0.74 0.94 -0....

alrededor de 3 años hace | 1

| aceptada

Respondida
How to set diffrent initial conditions as a vector.
I already showed you how to do that. If xvec and Tvec are your given vectors of grid points and associated temperatures, set ...

alrededor de 3 años hace | 1

| aceptada

Respondida
Runge-Kutta-4th-order solution of 3 ODEs
As you can see above, you get the same plot with a "professional" MATLAB solver (ODE45). So I guess there is something wrong wit...

alrededor de 3 años hace | 1

Respondida
[Mass Transfer] How do I solve the following infinite series analytical solution to find time (t)? The answers in solution manuals show that the answer is 5085.85 seconds.
D = 1.5e-7; % Diffusivity R = 0.05; % Radius CA0 = 0.2; % Initial Conc. CAS = 0.0; CA_target = 0.1*CA0; % Target Conc. N = ...

alrededor de 3 años hace | 0

| aceptada

Respondida
Integral of user-defined function
Your function is not vectorized. Thus you have to use integral_value = integral(f, 0, Inf, 'ArrayValued',true) instead of int...

alrededor de 3 años hace | 1

| aceptada

Respondida
trying to create a plot of cost per mile when the trailer weight increases in a program I wrote and i cannot get it to work.
%for plot clear clc F='diesel';%input('gasoline or Diesel: ','s'); C=6;%input('number of engine cylinders '); T='yes';%inpu...

alrededor de 3 años hace | 0

Respondida
Plotting the integral of a graph using cumtrapz.
Then my guess is that some of the x-values (maybe starting around 60) are NaN values. Remove them before applying "cumtrapz".

alrededor de 3 años hace | 2

Respondida
Loop: for i = 1:L ;
because i got the task to do it like that and not to use: data(:,i+1) = data(:,i) * p. Then use for i = 2:L

alrededor de 3 años hace | 0

Respondida
Accelerate a loop involving the built-in integral command
You will have to reorder the "Output" array, but I think the code should be faster. my_fun = @(t,param) t.^2; T = 2; omega = ...

alrededor de 3 años hace | 0

Respondida
Why am i getting this error>>>Index exceeds the number of array elements (1). Error in Boom (line 38) Y(t) = X_best_so_far(t-1); % Use X_best_so_far value for the
As you correctly write in your code, the line X_best_so_far = X_best_so_far(1); % Initialize X_best_so_far as a scalar sets X_...

alrededor de 3 años hace | 0

Respondida
Using Matlab to solve 1D Schrödinger Equation (Strange Eigenfunctions)
N = 2000; dy = 1/N; y = linspace(0,1,N+1).'; mL2V = @(y)1000*(y-0.5).^2; e = -1/(2*dy^2)*ones(N-1,1); d = 1/dy^2 + mL2V(y(2...

alrededor de 3 años hace | 1

| aceptada

Respondida
Numerically solve a 3rd order differential equation with 3 unknowns
Use "gradient" three times to get approximations for y', y'' and y''' in the points of your t-vector. Let diff_y, diff_y2, diff...

alrededor de 3 años hace | 0

| aceptada

Respondida
How to plot a continuous graph as shown in the below graph?
t1 = [1 6]; y1 = [1 1]; t2 = [6 7]; y2 = [0.45 0.45]; t3 = [7 8]; y3 = [1 1]; t4 = [8 9]; y4 = [0.4 0.4]; t5 = [9 11]; y5 = ...

alrededor de 3 años hace | 1

Respondida
Storing parameters from a for loop in arrays
t = [0:0.2:3].'; y = [3.43101641262231;-0.527550212558249;3.43697613505530;0.186721377613475;5.11301585254667; 6.786264197...

alrededor de 3 años hace | 0

Respondida
how can improve my code performanece, it uses a syms vector, i tried to delete y=t= sym(zeros(1, m + 3)); and it's faster but the solution of the function its wrong
You can't use t(k), t(k+1), t(k+2), y(k), y(k+1) and y(k+2) to define y(k). The values for these y's and t's are not yet known. ...

alrededor de 3 años hace | 0

Respondida
error in for loop
I substituted 1/sqrt(x) by y in your equation. As you can see, there are only negative solutions such that resubstituting gives ...

alrededor de 3 años hace | 0

Cargar más