Filter löschen
Filter löschen

Backward differentiation of a mass matrix, Using Fzero function

1 Ansicht (letzte 30 Tage)
Venkatesh M Deshpande
Venkatesh M Deshpande am 16 Mär. 2014
Hi, Following is my code. Initial conditions are given on the top of the code. I have specified an eqn which is given in inline function. A3 is a matrix of 49788*688 values and I want to find X for every values of A3. I am using fzero function but I think I am doing some mistakes in its syntax. Moreover, it say subscripts indices must be real or positive integers and there is some error in initial conditions. Can anybody correct this code? Q is equal to 49788
Cp(0)=1;
Cp(-1)=1;
for k = 1:Q;
fx = inline('3.5 *(X - 2*Cp(k-1) + Cp(k-2)) + 106*(X-Cp(k-1)) * abs(X-Cp(k-1)) + X- A3','A3');
[x,feval] = fzero(fx,0,Cp(0),Cp(-1),A3);
Cpi(k) = X;
end

Antworten (0)

Kategorien

Mehr zu Optimization finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by