Question: When a part is manufactured, it needs to be 5 . 4 cm long, and within plus or minus 0 . 1 cm ( 5

When a part is manufactured, it needs to be 5.4 cm long, and within plus or minus 0.1 cm (5.40.1 cm). Write a function to determine whether a part is within these specifications. Your function should have a single input, part_length and no output. Instead your function should display a message indicating whether the part meets specifications. c Hint: You need to create a function file (Session 7), and define the if structure in that function file. Save your function as checklenght.m.(b) Many solid-fuel rocket motors consist of three burn stages. Assume that the following data approximately represent the times during which each stage burns: Stage 1 Stage 20-100 seconds 100-170 seconds Stage 3 Stage 4(no burn) beyond 260 seconds 170-260 seconds Write and test a function to determine burn stage. Your function should have a single input, flight_time (in seconds) and a single output, stage_number. Hint: You need to create a function file (Session 7), and define the if structure in that function file. Save your function as burnstage.m.(c) Create a program in a script file called Q3.m and test each of the above user defined functions with an example/(i.e., part_length=5.45 for the first function and flight_time =120 for the second function). Use %% to create sections for each part.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!