フィルターのクリア

Backward differentiation of a mass matrix, Using Fzero function

1 回表示 (過去 30 日間)
Venkatesh M Deshpande
Venkatesh M Deshpande 2014 年 3 月 16 日
編集済み: Venkatesh M Deshpande 2014 年 3 月 18 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeOptimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by