r1_yun - Recitation 1 Purpose a) Learn how to use MATLAB...

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

View Full Document Right Arrow Icon
Recitation 1 Purpose a) Learn how to use MATLAB desktop and its various windows (command, workspace, etc.) b) Learn how to get help (helpdesk, doc, etc.) Problems (Note, remember to get help from Matlab, when you meet difficulties.) 1. Use Matlab to calculate the following problems. a) (5^2)/(48-33) b) 3 7 5 2 + 2. Create a bunch of variables (some with decimals, some with character arrays). a = ‘hello’; A = 27; % Variable names are case sensitive, so variable A is different from a. b = ‘m’; x = 15; x = x + 1; % Now, what is the value of x? y = 22.45; d = x + y; variable1 = 2 + 3i; % complex number variable2 = 2 + 3 * y; % Notice the difference circumference = 2 * pi * r; % Figure out why this does not work. whos; % What does the whos command tell you? clear d; % Delete variable d. 3. a = 1 : 5; % colon operator, also try 1 : 1 : 5 % How do you create the same vector a by using linspace ? (Remember to get help from Matlab.) b = 1 : 0.2 : 5;
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.

Page1 / 2

r1_yun - Recitation 1 Purpose a) Learn how to use MATLAB...

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