help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with ode23


From: Juan Pablo Carbajal
Subject: Re: problem with ode23
Date: Sun, 29 Jan 2017 21:38:12 +0100

On Sun, Jan 29, 2017 at 1:02 PM, Adrianna Andrusiewicz
<address@hidden> wrote:
> Hi, I have problem with my code in Octave. I have to  solve a  differential
> equation.
> My code is:
> %make an m-file for all three, exer442.m
> function Yprime3= exer444(t,Y);
> x=2, y=5, z=1.5;
> Y(1)=x, Y(2)=y, Y(3)=z;
> Yprime3(3,1)=2*Y(3)-Y(3).*Y(3)-Y(2).*Y(3);
> end
> %all three
> [t,Y]=ode23(@exer444,[0 200],[2;5;1.5]);
> plot(t,Y(:,3),'g') %grass behavior
> hold on
> plot(t,Y(:,2),'b') %sheep behavior
> plot(t,Y(:,1),'r') %wolf behavior
>
>
> but I have an error:
> error: 'ode23' undefined near line 8 column 6.
> What is bad with my code?
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave
>
ode23 is not yet part of octave. You need to install a the odepkg
package for the moment
https://octave.sourceforge.io/odepkg/overview.html
in future version of octave ode* will be included by default.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]