{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# HW3 - should read-in a value for the radius and display the...

This preview shows page 1. Sign up to view the full content.

Homework #3: If Commands Reading: 3.1, 3.3, 3.4.1-3.4.3 Homework: This assignment will be done entirely in MATLAB. When asked for a “program” you should create an m-file (script). Be sure to turn-in the completed script along with any runs you are asked for. A flow diagram is required for each problem. When asked to “evaluate” you may use the command window as a scratch pad to complete the results. Turn problems in IN THE ORDER THEY ARE ASSIGNED. Each problem needs to be labeled so the TA can find your work. Do the following exercises from your textbook 1. 3.1 all 2. 3.2 3. 3.5 4. 3.6 Write a MATLAB script (m-file) that 5. Will calculate the volume and surface area of a SPHERE from the radius. Your script
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: should read-in a value for the radius and display the calculated values with appropriate units. The units should also be read-in. Test your program for r = 3 in and r = 10 mm. 6. Will perform a speciﬁed operation (addition, subtraction, multiplication, division) as input by the user for two variables also input by the user. Hint: Operation characters can be entered as character strings. The end result of your program should look some-thing like below >> operation Enter first variable: 5 Enter second variable: 4 Enter operation to be used [+,-,*,/]: + Result: 5+4 = 9 Test your program for a = 3 and b = 2 for all four operations....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online