I have problem withis system of ode , this is onlya part of the code
N.B I have the latest version of MatLab.
Thanks for your help
Nt=150 m_ox=0.7;m_ox=m_ox.*ones(1,Nt);r_dot=0.0006m_dot_pr=1.7 ;v_cham=1*10^(3);m_fuel= 15.*ones(1,Nt);burn_time=50;t=linspace(0,burn_time,Nt)C=((m_dot_fuel+m_ox-m_dot_pr)./(v_cham)) ;A=((4*r_dot)./Dp_t);y1_0=zeros(Nt,1);y1_0=y1_0(:);t=t(:);y2_0=rho_ox_0.*ones(1,Nt);y2_0=y2_0(:);y_0=[y1_0,y2_0];[t_sol,y_sol]=ode45(@(t,y1,y2)zero_dmodelcc(C,A,y1,y2,t,v_cham,m_dot_pr,m_ox),t,y_0);function dy=zero_dmodelcc(C,A,y1,y2,t,v_cham,m_dot_pr,m_ox)y=[y1;y2];v_cham=v_cham(:);m_ox=m_ox(:);C=C(:);A=A(:);dy1 =C-(y1.*A);dy1=dy1(:);dy2=((y1.*m_ox)./(v_cham))+y2.*(A-m_dot_pr);dy2=dy2(:);dy=[dy1,dy2];end
Best Answer