Answered
How can I solve 3 non linear functions simultaneously?
dOD0 = 7.0; dOD = fzero(@fun,dOD0) function res = fun(dOD) CNO3=0; CMNO3=0; Q=0.0107; tao=0.0217; TR=0.0048; Temp=13.4232...

4 years ago | 0

| accepted

Answered
Find exponent of equation
A good approximation for K, x and y can be obtained by taking the log on both sides of your equation: log(P) = log(K) + x*log(f...

4 years ago | 0

Answered
Solving of two interdependent functions
If you solve both of the two equations u=sqrt((8/3)*((ro-1.24)*R*9.8)/(Cd*1.24)) Re=(1.24)*u*2*R/(18*10^-6) for u, you get a ...

4 years ago | 0

Answered
Error using surf: Data dimensions must agree
d1=(log(S0./X)+(((r_base-r_quote)+((vol).^ 2./2)).*(T-t)))./(vol.*sqrt(T-t)); instead of d1=(log(S0./X)+(((r_base-r_quote)+((v...

4 years ago | 0

| accepted

Answered
Solving a non linear ODE with unknown parameter
Your ODE for D_p gives D_p = 1/(1/D_p0 + k1*(t-t0)) where D_p0 = D_p(t0). Now you can apply "lsqcurvefit" to fit the unknown ...

4 years ago | 1

Answered
Split up a matrix into n peices
A = reshape(A,60,24).'

4 years ago | 0

Answered
Plotting Solution Curve on Direction Field
ySol = dsolve(ode, [y(-1)==0,Dy(0)==0]); dySol = diff(ySol,x); instead of ySol1 = dsolve(ode, y(-1)==0); % Solution to DE app...

4 years ago | 0

| accepted

Answered
"Index exceeds the number of array elements. Index must not exceed 1."
tau(i)= beta*gamma*((mu*u0)/delta2(i)); instead of tau(i)= beta*gamma*((mu*u0(i))/delta2(i));

4 years ago | 1

| accepted

Answered
estimation of parameters by using lsqnonlin for system of differential equations
data = [ 1 36456 2 70217 3 108526 4 145164 5 181275 6 213547 7 240654 8 272721 ...

4 years ago | 0

Answered
Error with Integral2 where func is a constant number
f=@(x,y) ones(size(x))

4 years ago | 0

Answered
Fit 2 parameters with lsqcurvefit including an integral term
xdata = [10.30, 29.88, 59.64, 99.58, 149.66, 209.96, 280.44, 361.03, 451.87, 552.89, 664.10, 785.38, 916.94, 1058.68, 1210.48, 1...

4 years ago | 1

Answered
Least Squares Curve Fit make minimum add to 1
C = [xdata(:,1),xdata(:,2)]; d = ydata(:); lb = [0; 0]; ub = [1 ;1]; Aeq = [1 1]; beq = 1; a = lsqlin(C,d,[],[],Aeq,beq,lb...

4 years ago | 0

Answered
How would I set parameters for the output value of my script to say if something was laminar or turbulent?
function [Re,FlowRegime] = reynum(P,v,l,u) Re = P*v*l/u; if Re <= 2000 FlowRegime = 'Laminar'; else FlowRegim...

4 years ago | 0

Answered
Nonlinear differential equation with unknown parameter
Seems your problem is easier than the one discussed under (Solving a 6th order non-linear differential equation in Matlab) for...

4 years ago | 0

Answered
how to find a max value of a plot at a certain x value
V_x= @(x)R1*(x>0).*(x-0).^0 - Wshaft*(x>0).*(x-0).^1 + Wshaft*(x>14).*(x-14).^1 - Wsprocket*(x>4.2917).*(x-4.2917).^1 + Wsprocke...

4 years ago | 1

| accepted

Answered
Double integral using matlab multiplication
th=pi/(2*180):pi/180:pi-pi/(2*180); %theta phi=pi/(2*180):pi/180:2*pi-pi/(2*180); %phi dth=th(6)-th(5); dphi=phi(6)-phi(5); ...

4 years ago | 0

| accepted

Answered
how to multiply every element in an array?
product = prod(o) is the short version, product = 1.0; for i = 1:numel(o) product = product*o(i); end product is the...

4 years ago | 1

Answered
ODE solver vs discrete integration
alpha_0 = 0.03; alpha = 298.2; beta = 0.2; n = 2; time = [0:0.1:300]; dt = 0.1; method = 1; init_cond = [10 10 0 0 0 0]; ...

4 years ago | 0

Answered
Plot function given by integral depending on a parameter
f = @(a,t) sin(a*t); F = @(a,x) integral(@(t)f(a,t),0,x); a = 1; x = 0:0.1:2*pi; Result = arrayfun(@(x)F(a,x),x); plot(x,Re...

4 years ago | 0

| accepted

Answered
Matrix dimensions must agree when doing an elementwise operation
Yes, a,b and c must have the same number of elements for that an elementwise multiplication makes sense. Maybe you mean d = (a...

4 years ago | 0

Answered
How can I model temperature advection due to percolating rain water?
I think the equation to calculate the increase in temperature T of the falling raindrop is -u*rho*cp*dT/dx = 3/R * alpha * (T-T...

4 years ago | 0

Answered
How can I multiply each row of 3 matrices individually?
(x.*rij).' * ai - Kj*y <= 0 assuming that ai and y are column vectors.

4 years ago | 0

Answered
Plot 3D of coinstraned optimization
x=-2:0.01:2; y=-2:0.01:2; [X,Y] = meshgrid(x,y); Z = X.^2-2*X+1+Y.^2; xx=-1:0.01:1; yy=-1:0.01:1; y1 = (1-xx.^4).^(0.25)...

4 years ago | 2

Answered
how to write zeta in matlab
https://de.mathworks.com/help/matlab/creating_plots/greek-letters-and-special-characters-in-graph-text.html

4 years ago | 0

Answered
Minimize a function using gradient descent
X = -2:0.1:2; Y = -2:0.1:2; [X,Y] = meshgrid(X,Y); Z = 2*X.^2+3*Y.^2; surf(X,Y,Z) hold on x(1) = 2; % initial value of x ...

4 years ago | 1

| accepted

Answered
how to plot ellipse around poincare map of RR intervals
Try https://de.mathworks.com/matlabcentral/fileexchange/9542-minimum-volume-enclosing-ellipsoid on your point sets.

4 years ago | 0

Answered
Plot does not appear.
E1=1:73 W=15; L=1.3; w=0.25; h=0.075; I=(w*h^3)/12; Deflection5 = (W.*L.^3)./(3.*E1.*I) plot(E1,Deflection5)

4 years ago | 0

| accepted

Answered
How can i use elements with equal indexes?
Put "-M" in the matrix of inequality constraints where x_jj is addressed and "+1" where y(j) is addressed. Then you have set th...

4 years ago | 0

Answered
Plotting Gradient of a 3-variable Function
Depends on what you want to plot. In each point (x,y,z), the gradient g=(gx,gy,gz) is a 3d-vector associated with this point....

4 years ago | 0

Load more