ENGR13200_Sp12_HW06_Problems

ENGR13200_Sp12_HW06_Problems - HW Problems

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

View Full Document Right Arrow Icon
ENGR 13200 Ideas to Innovations Part II Spring 2012 HOMEWORK #6 Due: Class 6B SUMMARY OF READING AND UPCOMING DELIVERABLES DUE HC E Reading: While Loops - Chapter 28.4.2 (pp. 645-653) 6b Homework Problems: Problem 1: MATLAB UDF – Water Tank 6b Problem 2: MATLAB UDF – Phase Diagram 6b Problem 3: Peer Evaluation 1 6b - MEA1 Just-in-Time Manufacturing Problem 4: MEA1 – Confidence Reflection II 6b - Problem 5: MEA1 – Individually Created Data Sets 6b - HC = Hard copy E = Electronic submission 1. MATLAB User Defined Function - Water Tank (This problem is to be completed individually and contributes to your homework grade .) Revisit Problem 2 from HW05. A. Open function_header_template.m in the MATLAB editor and re-save as hw06_water_tank _yourlogin .m . B. Convert your script file from HW05 (Problem 2) to a user-defined function. Your function should have one input argument – position (height) of the float (ft), and one output argument – volume of water in the tank (ft 3 ). Do not hard code the inputs into the function! Be sure to include in your code a test for valid inputs. When invalid inputs are provided, display an appropriate error message. (Hint: See ICA05A, Activity 3). Once you have debugged your function, be sure to suppress all outputs to the Command Window using a semicolon at the end of each assignment or computation. C. In the MATLAB Command Window, call your function using the test cases defined below. a. h = 60 ft d. h = 86 ft b. h = 54 ft c. h = 20 ft e. h = 40 ft f. h = -30 ft This is an example of how to call the function using test case a: >>h_a=60; >>vol_tank_h_a=hw06_water_tank_yourlogin(h_a)
Background image of page 1

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

View Full DocumentRight Arrow Icon
ENGR 13200 Ideas to Innovations Part II Spring 2012 Paste the height variable assignments, function calls, and results displayed in the Command Window as comments in the OUTPUTS section of the function m-file. Deliverables: Submit a hard copy of your MATLAB script, hw06_water_tank _yourlogin. m. Upload to blackboard, your MATLAB script, hw06_water_tank _yourlogin. m, into your Instructor’s drop box entitled HW06 . 2. MATLAB User Defined Function – Phase Diagram (This problem is to be completed individually and contributes to your homework grade . ) Revisit Problem 3 from HW05. A.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/17/2012 for the course ENGR 132 taught by Professor Kutson during the Spring '11 term at Purdue University-West Lafayette.

Page1 / 5

ENGR13200_Sp12_HW06_Problems - HW Problems

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

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