Question: User - defined Functions. The Choking Mass Flow Rate for an ideal compressible gas is shown below. Create a user - defined function called LastnameMassFlow.m

User-defined Functions. The Choking Mass Flow Rate for an ideal compressible gas is shown
below. Create a user-defined function called LastnameMassFlow.m where mass flow () is the output. All
other variables listed below are inputs.
=
(+
)
+
()
Where,
=
=
=
=
=
=
Create a Matlab user-defined function that performs the following:
1.1.(3 points) Create the main function line with outputs and inputs.
1.2.(2 points) Ensure the file name matches the function name (LastnameMassFlow.m).
1.3.(2 points) The user should have the option not to input the Mach value, M. In this case, the value for M
should be set to 1 and a display should be shown informing the user that Mass Flow is at a maximum
and that the flow is choked.
1.4.(3 points) Include some type of error check for the number of inputs. Based on the information provided,
you should be able to determine the minimum and maximum number of inputs.
1.5.(4 points) Properly perform the algorithm to achieve output.
1.6.(1 point) Proper header comments.
1.7.(1 point) Proper function comments.
Submit the final m-file into Canvas with the name LastnameMassFlow.m. List your full name and Student
ID in the first line of your script as a comment. Add appropriate and sufficient comments to the script
prior to submitting.

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 Mechanical Engineering Questions!