Exercises
Use Matlab to answer each question.
-
Create a file named
M-File_notes.m
, enter some notes to yourself about m-files, and then save and close the file.To name a file, you must save the file. Be sure to choose a valid name.
-
Create another m-file that contains the following text:
function sa = surfaceArea( sideLength ) % Returns the surface area of a cube with sides that are "sideLength" long. sa = 6 * sideLength.^2 ;
-
Save the m-file that you created in the previous exercise with the name
surfaceArea.m
.