Recitation 08 Presentation

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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
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

This note was uploaded on 01/11/2010 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.

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 Right Arrow Icon
Ask a homework question - tutors are online