(adsbygoogle = window.adsbygoogle || []).push({}); ??? 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

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# ? Input argument y is undefined.

**Physics Forums | Science Articles, Homework Help, Discussion**