Question: Write a single . m file script with both the following parts: Part 1 : Using a For Loop, solve for dynamic pressure, q =

Write a single .m file script with both the following parts:
Part 1:
Using a For Loop, solve for dynamic pressure, q =0.5* density * velocity^2, from zero velocity to 250 m/s, in steps of 10 m/2, at sea level (density =1.225 kg/m^3). Be careful with your index here.
Display to the Command Window the index and value for q at each step through the loop.
Part 2:
Write a For Loop that executes 20 times, and within that loop write an If Statement that uses the MATLAB rand() random number generator to generate a value. Have the If Statement evaluate that value and then display to the Command Window:
"too small" for a value less than 0.33
"just right" for a value greater than or equal to 0.33 and less than 0.66
"too big" for a value greater than or equal to 0.66
Comment all variable names within the file, including units for those that have units.

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 Databases Questions!