- #1
okkadu
- 1
- 0
? Input argument "y" is undefined.
HII Friends
Iam little bit new to MATLAB and iam trying to use ode45 and wrote code as
function dy = sampleode(t,y)
dy=zeros(2,1);
dy(1)=-0.192*y(1)*log(y(1)/y(2).^3);
dy(2)=(1/3)*(5.85-0.00873*y(2).^2-0.15*0*y(2)-0.02*y(2));
[t,y]=ode45('sampleode', [0:5:40],[1;1]);
BUt iam getting the below error:
? Input argument "y" is undefined.
Error in ==> sampleode at 3
dy(1)=-0.192*y(1)*log(y(1)/y(2).^3);
I saved my mfile as sampleode.m .please suggest me any suggestions. Thanks in advance
HII Friends
Iam little bit new to MATLAB and iam trying to use ode45 and wrote code as
function dy = sampleode(t,y)
dy=zeros(2,1);
dy(1)=-0.192*y(1)*log(y(1)/y(2).^3);
dy(2)=(1/3)*(5.85-0.00873*y(2).^2-0.15*0*y(2)-0.02*y(2));
[t,y]=ode45('sampleode', [0:5:40],[1;1]);
BUt iam getting the below error:
? Input argument "y" is undefined.
Error in ==> sampleode at 3
dy(1)=-0.192*y(1)*log(y(1)/y(2).^3);
I saved my mfile as sampleode.m .please suggest me any suggestions. Thanks in advance