Recitation 02 Presentation

# Recitation 02 Presentation - 14:440:127 14:440:127...

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

4:440:127 14:440:127 Introduction to Computers for Engineers Recitation 2 Lecturer: Blase E. Ur Recitation Instructor: Bocheng ‘Bo’ Jin Recitation Instructor: Cyrus Gerami Recitation Instructor: Vishnu Vijayakumar Recitation Instructor: Wen Yueh

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

View Full Document
14:440:127 Recitation 2 uilt Functions Built-in Functions Functions come with Matlab, fundamental and used often • sqrt(5) % square root of 5 throot(27 3) cube(3) root of 27 nthroot(27,3) %cube(3) root of 27 • sin(pi) % sine of pi radians • cos(pi/2) % cosine of pi/2 • asin(1) % arcsine of 1 • sind(75) % sine of 75 degrees •… . Rutgers University SOE
14:440:127 Recitation 2 elp Comments Help, Comments • help <cmd> – manual in your command window • doc <cmd> more elaborate help in the help browser • % starts a line of comment stuff = stuff * 10; % adding a zero % remember to take the absolute value Rutgers University SOE

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

View Full Document
14:440:127 Recitation 2 ormatting text Formatting text •X = 5 ; = X 5 isp(X) disp(X) 5 ; X; • fprintf(‘The value of X is %f, my dear sir. \n’, X); he value of X is 5 000000 my dear sir Rutgers University SOE The value of X is 5.000000, my dear sir.
14:440:127 Recitation 2 rintf fprintf name = 'Jones'; x = 14.7; fprintf('Mr. %s has %f Matlab books.\n', name, x) • The %s signifies that a string of characters will go there • The %f signifies that a floating point number (decimal) will go there he result? The result?

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.

## 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 / 26

Recitation 02 Presentation - 14:440:127 14:440:127...

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

View Full Document
Ask a homework question - tutors are online