필터 지우기
필터 지우기

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 CenterFile Exchange에서 Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by