Answered
fsolve exitflag -2, 9 equations 9 variables
delta_lambda = 0.1; lambda_start = delta_lambda; lambda_end = 1.0; lambda = lambda_start:delta_lambda:lambda_end; n = numel(...

4 years ago | 0

| accepted

Answered
Solving multiple PDE with using PDEPE
L = 1500; %lenght x = linspace(0,L,1501); %x values from 0 to 1000 and dx...

4 years ago | 1

| accepted

Answered
how to define the range with variable
h_H2 = 0; h_O2 = 0; h_H2O = -241827; s_H2 = 130.59; s_O2 = 205.14; s_H2O = 188.83; T_ref = 298; T = 293:1173; n = 2; F ...

4 years ago | 0

Answered
When solve ODEs return NaN value
The command Cgd=interp1(vds2,crss,x(4)); in odefun2 returns NaN. The reason is that x(4) > 400 and you only have specified cr...

4 years ago | 1

| accepted

Answered
Indefinite integral for a step function with variable number of steps
The definite integral between a and b where mesh(1) <= a < b <= mesh(end) can be computed as for every other function as value_...

4 years ago | 0

| accepted

Answered
Solving a system of coupled diferential equations using ODE15s
Use ODE15I instead of ODE15S. Or use "fsolve" or "linsolve" to explicitly solve for x', y' and z' in the function where you re...

4 years ago | 0

Answered
Extend bvp4c for bvps
If you have to refer to x(t-Ts) and u(t-Ts), you have a delay differential equation. Take a look at DDE23 if it fits your needs...

4 years ago | 0

Answered
solving system of equation in for loop
Tb = (Te*(B-A)+A*C*I)./(1-A*(D-1./I)); Ta = (Tb-B*Te)/A;

4 years ago | 0

Answered
Getting same final value for various time-steps
for k=1:7999 for i=2:m-1 for j=2:m-1 T(i,j,k+1)=1/(1+2*r)*(r/2*(T(i-1,j,k+1)+ T(i+1,j,k+1)+ T(i,j+1,k+1)...

4 years ago | 0

Answered
Solver stopped prematurely. No integer feasible point found
I get the following solution 0. - 159.2453 0. - 124.7959 0. 0. -...

4 years ago | 0

Answered
sol = bvp4c (OdeBVP, OdeBC, solinit, options);
function slipflow format long g %Define all parameters % Boundary layer thickness & stepsize etaMin = 0; etaMax1 = 15; eta...

4 years ago | 1

| accepted

Answered
How to solve coupled odes with two time dependent variables with ode45?
function dy = odfun(t,y,Kl,qm,Keq,R,T,n,rhop,eps) q = y(1); c = y(2); dy(1) = Kl*((qm*Keq*c*R*T/(1+(Keq*c*R*T)^n)^(1/n)...

4 years ago | 1

| accepted

Answered
Difficulty solving simple implicit equation
Imin = ...; Imax = ...; a = ...; R = ...; V = array of values L = array of values fun = @(Im,V,L) Im - ((Imax-Imin).*L +Im...

4 years ago | 0

| accepted

Answered
How to use for loop when have syms inside the loop
Try syms t x(t) Xmax = 1410.34; conc = [50 100 150]*1e-9; ka ...

4 years ago | 0

Answered
Not able to solve fzero with array by for-loop
To see where the problem with fzero is, I suggest you first plot your function for a reasonable value of lambdaCH_030_4h: c_int...

4 years ago | 1

Answered
How to solve coupled partial differential equations with method of lines?
The sink term - (((1-eps)*rhop)/eps)*dqdt(i); for the concentration of your gaseous species is always 0 because you specify d...

4 years ago | 0

Answered
How to plot the results from dsolve matlab
Rmax = 1410.34; conc = 500e-9; ka = 3.46e3; kd = 1.46e-4;...

4 years ago | 0

| accepted

Answered
getting error in for loop
Loop indices don't start at 0, but at 1 in MATLAB: for i=1:length(Vds) Idsat(i)=r1*(Vgs-(r2)+Vds(i)); end instead of fo...

4 years ago | 0

Answered
How to correct the code?
gb=3;gs=8; ES=4.5;is=20;EB=1.5;ib=40; b=8;s=3;Ns=1;Nb=1; Esl=@(s)(ES)-(is/s)+Ns Eby=@(b)(ib/b)-(EB)-Nb f = @(s,b)(b*Eby(b)-...

4 years ago | 0

Answered
How to find the eigenvector associated with the highest eigenvalues.
Why not just trying whether A*x equals lambda_max*x within a certain tolerance ?

4 years ago | 0

Answered
Index in position 3 exceeds array bounds (must not exceed 80000).
keepgoing = true; for k=1:79999 % This line was k=1:p normally too instead of keepgoing = true; for k=1:80000 % This line wa...

4 years ago | 0

| accepted

Answered
calculation of a derivative writing a function
Your function does not have local maxima or minima in terms of theta0. If theta0 is restricted to an interval [theta0min,theta0...

4 years ago | 0

Answered
Setting up linear optimization problem
Since your vectors X and Y are of moderate size, don't use an optimization tool. I think it's best t...

4 years ago | 0

Answered
How to save dydt(3) equation computed inside ODE?
[t,y] = ode45(@(t,y) odefcn(t,y), [0 T_f], zeros(1,3)) ; dydt = zeros(size(y)); for i = 1:numel(t) dydt(i,:) = odefcn(t(i...

4 years ago | 0

Answered
how to take a value from multiple arrays defined from an expression.
for each row i found the max value between 7 arrays with a for cycle If you found the max value, you also found whether A/H,B/I...

4 years ago | 0

Answered
3D Polar Plot
a = 1.0; sigma = 2.0; r = 0.2:0.001:3; phi = 0:pi/100:2*pi; [R,PHI] = meshgrid(r,phi); X = R.*cos(PHI); Y = R.*sin(PHI); ...

4 years ago | 0

| accepted

Answered
Not having Integration result
Using "int", MATLAB tries to find an analytical antiderivative for your function, but cannot find one. Use numerical integraion...

4 years ago | 0

| accepted

Answered
how to write partial derivatives in MATLAB
Maybe https://de.mathworks.com/help/symbolic/sym.jacobian.html ?

4 years ago | 0

| accepted

Answered
How to plot x^2+y^2=<1 and to be upper the Ox ?
p = nsidedpoly(1000, 'Center', [0 0], 'Radius', 1); plot(p, 'FaceColor', 'r') axis equal

4 years ago | 0

Answered
Plotting arrays of same length
y_picchi = interp1(time,y,tempo_picchi); plot(tempo_picchi,y_picchi)

4 years ago | 0

Load more