{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Recitation 08 Presentation

# Recitation 08 Presentation - 14:440:127 Introduction to...

This preview shows pages 1–6. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 14:440:127 Introduction to Computers for Engineers Recitation 8 Lecturer: Blase E. Ur Recitation Instructor: Bo Jin Recitation Instructor: Cyrus Gerami Recitation Instructor: Vishnu Vijayakumar Recitation Instructor: Wen Yueh 14:440:127 Recitation 8 Animation % X floating through space for t=0:0.1:20 % choose a small interval x=t*cos(t); y=5*sin(t); pause(0.05) % can come anywhere in the loop Rutgers University School of Engineering pause(0.05) % can come anywhere in the loop plot(x,y,'X') axis([-20 20 -5 5]) % must follow plot end 14:440:127 Recitation 8 User Defined Functions In an m-file, which has the same name as your function First line; function [OUTPUT] = NAME(INPUT) Rutgers University School of Engineering 14:440:127 Recitation 8 Sum and product function [s p] = sumAndProduct(x,y) % Here is my help function s = x+y; p = x*y; % this is just a normal comment Rutgers University School of Engineering 14:440:127 Recitation 8 Variable Scope M files that aren’t functions and the command window share the...
View Full Document

• Fall '09
• blase
• Global variable, Rutgers University, Closure, Rutgers University School, Rutgers University School of Engineering

{[ snackBarMessage ]}

### Page1 / 9

Recitation 08 Presentation - 14:440:127 Introduction to...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online