Question: MatLab Engineering language Challenge Problem 3 Perhaps the most famous equation in physics is E = mc2, which relates energy E to mass m. The

MatLab Engineering language

Challenge Problem 3

Perhaps the most famous equation in physics is E = mc2, which relates energy E to

mass m. The speed of light in a vacuum, c, is the property that links the two together. The speed of light in a vacuum is 2.9979 x 108 m/s.

Create a function called energy to find the energy corresponding to a given mass in kilograms. Your result will be in joules, since 1 kg m2 / s2 = 1 J.

Use your function to find the energy corresponding to masses from 1 kg to 106 kg. Use the logspace function (consult help logspace if needed) to create an appropriate mass vector.

Create a plot of your results. Try using different logarithmic plotting approaches (e.g., semilogy, semilogx, and loglog) to determine the best way to graph your results.

Turn in a single .m file that does all of the above. Remember if you are using subfunctions, they should be defined sequentially, and your .m file will need to be a function file instead of a script file.

Grading Criteria. To achieve Meets Expectations for this Challenge Problem, the file should:

Create and call the subfunction correctly, using different variable names than the main function.

Use logspace correctly and creates a plot.

To achieve Exceeds Expectations for this Challenge Problem, the file should do everything listed for Meets Expectationsand also:

Show or discuss (in comments) multiple ways to plot the results.

Comments include units for variables that are defined or calculated.

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!