×

### Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

or

78

0

2

# 187 Class Note for CS 61500 at Purdue

Marketplace > Purdue University > 187 Class Note for CS 61500 at Purdue

No professor available

These notes were just uploaded, and will be ready to view shortly.

Either way, we'll remind you when they're ready :)

Get a free preview of these Notes, just enter your email below.

×
Unlock Preview

COURSE
PROF.
No professor available
TYPE
Class Notes
PAGES
2
WORDS
KARMA
25 ?

## Popular in Department

This 2 page Class Notes was uploaded by an elite notetaker on Friday February 6, 2015. The Class Notes belongs to a course at Purdue University taught by a professor in Fall. Since its upload, it has received 78 views.

×

## Reviews for 187 Class Note for CS 61500 at Purdue

×

×

### What is Karma?

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/06/15
0de45 Differential Equation Solver This routine uses a variable step Runge Kutta Method to solve differential equations numerically The syntax for 0de45 for rst order differential equations and that for second order differential equations are basically the same However the m les are quite different 7 I First Order Equations y T folly 050 yo A Create a m le for fty see the tutorial on numerical methods and m les on how to do this Save le as for example ypm B Basic syntax for 0de45 At a MATLAB prompt type tyode45 yp t0tf yO your version of 0de45 may not require brackets around to tf yp the 111 file of the function fty saved as ypm t0 tf initial and terminal values of t y0 initial value of y at to t2 315 C For example to numerically solve 7 71 over the interval 1 S t S 4 O 1 Create and save the le ypm for the function It y 315 9 At a MATLAB prompt type tylode45 yp 14 2 your version of 0de45 may not require backets around 14 0 To print results type ty 0 To plot results type plot ty 0 To plot results type with a 77 symbol plot ty y 2005 y 105 y 905 H Second Order Equations yt0 yo 7 750 Q1 A First convert 2nd order equation above to an equivalent system of 1 order equations Let 01 y 02 y ig 7 7 932 iqa 1 7170 2 gt 7where 501050 7 yo 502050 7 yl B Create and save a m le which will return a vector valued function This is a little tricky so here is a speci c example Suppose the system is as below and 0 S t S 4 Illg 7 7 95 715051 63th 3sin2t 7Where 5610 7 27 5620 7 839 o Create the following function le and save it as Fm function xpFtx xpzeros21 quotA since output must be a column vector xp1x2 xp2 tx1exptx23sin2t quotA don t forget after each line 9 Basic syntax for 0de45 At MATLAB prompt7 type txode45 F t0tf x10x20 F the 111 file of the vector function saved as above t0 tf initial and terminal values of 15 x10 initial value of 01 at to x10a 1t0 x20 initial value of 02 at to x20a 2t0 The example above becomes tx ode45 F 04 2 8 9 Since x105 y to print out the values of the solution y for to S t S 15f type tx1l To plot the solution on a graph 15 vs y type plot tx 1 This is because the vector x has 13 component 01 y and 2 component 02 y c To plot 01 vs 02 phase plane type plot x 1 x 2

×

×

### BOOM! Enjoy Your Free Notes!

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

Steve Martinelli UC Los Angeles

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Anthony Lee UC Santa Barbara

#### "I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

Bentley McCaw University of Florida

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!
×

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com