>> %Resujemo y'=-y+exp(-x);y(0)=0; >> %definiramo funkcijo >> f=@(x,y) -y+exp(-x); >> %Dolocimo delilne tocke >> x=linspace(0,3,10); >> [x,y]=ode45(f,x,0); warning: Octave provides lsode for solving differential equations. For more information try 'help lsode'. Matlab-compatible ODE functions are provided by the odepkg package. See . Please read to learn how you can contribute missing functionality. warning: called from __unimplemented__ at line 524 column 5 error: 'ode45' undefined near line 1 column 6 >> %naloziti moramo paket odepkg, prej ga moralo instalirati >> pkg load odepkg >> %lahko pa uporabite lsode, vendar pazite na vrstni red argumentov pri f; f=f(y,x)!!!! >> [x,y]=ode45(f,x,0); >> clf;hold on;grid; >> %izrisemo >> plot(x,y,'ro') >> diary off