Problem running old *.m file in Matlab 7.10.0

hello!
I'm new to this forum. I have matlab program that was written in Matlab 5.2. i would like to upgrade that program but first i must get running the original version.
_global a_bar b_bar acc_ratio t_start menu1 z Acc I_frq kg a=0.8552; b=0.8552; Alfa=a/b; fill_level=0.5; Gama=(0.7726259-1.304727/Alfa)*(fill_level)^2+(-1.780896+1.542048/Alfa)*(fill_level)+1; b_bar=b*Gama; a_bar=b_bar*Alfa; t=[0:0.1:40]; z=size(t,2); acc_ratio=0.05;
t_start=1;
Y=[0;0];
options=odeset('RelTol',{1e-6},'AbsTol',{1e-6});__ITALIC TEXT_
i have problem with following part:
>> [t,dif]=ode45('equ_mot',t,Y,options); ??? Subscripted assignment dimension mismatch.
Error in ==> equ_mot at 14 elliptical(2,1)=(-a*cos(Y(1))*acc+0.5*Y(2)^2*(a^2-b^2)*sin(2*Y(1))-9.81*b*sin(Y(1)))/(a^2*(cos(Y(1)))^2+b^2*sin((Y(1)))^2); Error in ==> odearguments at 110 f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173 [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
could some, please, tell me how to start solving my problem?
thx :D

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!