Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!news.glorb.com!news2.glorb.com!news.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: Carp Fisher <bmjim@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Euler method for a system
Date: Sat, 07 Nov 2009 16:08:38 EST
Organization: The Math Forum
Lines: 15
Message-ID: <180243118.32817.1257628148648.JavaMail.root@gallium.mathforum.org>
NNTP-Posting-Host: gallium.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1257628148 13806 144.118.94.39 (7 Nov 2009 21:09:08 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Sat, 7 Nov 2009 21:09:08 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:583264


I have the two equations:

dx/dt = -2x
dy/dt = 5x - y

x(0) = 5
y(0) = 1

for t values between 1 and 200

I want to use the Euler method to solve this system and then graph each x and y vs t.

Could someone point me to a code that could do this?  Don't worry, I don't need to come up with the code myself, so helping me out here isn't contributing to cheating in anyway.  Thanks,

Jim