Recitation 01 Problems- Solutions

Recitation 01 Problems- Solutions - 14:440:127 Introduction...

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

View Full Document Right Arrow Icon
14:440:127 Introduction to Computers for Engineers, Spring 2009 Recitation 1 - Problems for students to attempt *Use Matlab to find the sum of 5, 2 squared, and 4. 5+2^2+4 *Set the variable matlabvariable to equal the difference of 453 and (4 to the third power). Then, on the next line, increase matlabvariable by 15. matlabvariable = 453 - 4^3; matlabvariable = matlabvariable + 15; *Which of the following variable names are permitted? 7up School-of-Engineering Rutgers for Rutgers_University sin Rutgers Rutgers_University sin is also a legal variable name, but it's a bad idea to use it (since it temporarily overwrites the sin function) *Create a bunch of variables (some with decimals, some with character arrays i.e. x = ‘hello’ )…. and then use the whos command to verify what variables have been defined. Then, delete a single one of those variables using the clear command. x = 'hello'; y = 15; z = 22; d = 342.42; whos clear d; *Run the following two commands: 1) x = 56; 2) y = 87; Now, switch the values of x and y. x = 56;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
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 / 4

Recitation 01 Problems- Solutions - 14:440:127 Introduction...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online