Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is an M-file?
Think about the file type that includes commands.
How do you execute commands in an M-file?
Similar to executing commands directly in the Command Window.
What is the extension of an M-file?
Think of the specific format used in MATLAB.
True or False: Variables created in an M-file do not appear in the workspace.
Recall how the workspace behaves after running a script.
Write a MATLAB script that calculates the roots of a quadratic equation ax^2 + bx + c = 0. Allow for user input for a, b, and c.
Use the input function to take coefficients and the sqrt function for square root calculation.
Create an M-file that generates two separate plots: one for the function y = e^x and another for y = ln(x) over the interval (0, 10).
Think of how to use the 'exp' and 'log' functions in MATLAB to generate both y values.
6 more questions in this section. Enroll free to practise them all.
Enroll free