Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: diff eq
Replies: 8   Last Post: Apr 11, 2013 2:27 AM

 Messages: [ Previous | Next ]
 richard Posts: 5 Registered: 4/10/13
Re: diff eq
Posted: Apr 10, 2013 6:21 AM

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <kjtnkm\$ro7\$1@newscl01ah.mathworks.com>...
> "richard " <richard7893@embarqmail.com> wrote in message <kjrsih\$mgb\$1@newscl01ah.mathworks.com>...
>

> >
> > this is what I am typing into MATLAB:
> > function dx = system_ex(t,x)
> > dx = zeros(4,1);
> > dx(1) = -2.4712*x(1) + 0.005*x(2) + 0.56*x(3)+ 0.1*x(4);
> > dx(2) = 0.385*x(1) - 0.1002*x(2)
> > dx(3) = 0.002*x(2) - 0.6462*x(3)
> > dx(4) = 0.007*a(2) - 0.2042*x(4)
> > [T,X] = ode45(@systems_ex,[0 10],[1 0 0 0])
> > plot(t,x(:,1))
> >

>
> I hope you save system_ex in an mfile and call ode45 on another mfile. You seem to put everything in the same mfile.
>
> Bruno

Date Subject Author
4/7/13 Guest
4/8/13 Bruno Luong
4/10/13 Guest
4/10/13 Torsten
4/10/13 Guest
4/10/13 Torsten
4/10/13 Bart
4/11/13 Torsten
4/10/13 richard