ENGR 111 Study Guide - Midterm Guide: Matlab, Filename Extension

95 views1 pages

Document Summary

Rat 7. 2 - introduction to matlab. You may not use matlab to answer the following questions. List variables in workspace, with sizes and types. Name three ways to access matlab"s help system. fx button. Name two ways to run a matlab script. In command window by calling them by name. In the editor by pressing the green run button (or f5). Write a script named computearea that asks the user for a radius and prints the string. The area of the circle with radius m is m^2 . Example: (your screen should look similar upon running your script) The area of the circle with radius 1 m is 3. 141593 m^2. >> r = input ( what is the radius?") >> fprintf ( the area of the circle with radius %f m is %f m^2",r,a)