Question: Name ( please print ) : Score: Part 1 : Fill in the Blanks, Short Answer ( 2 points ) Scripts use variables from the

Name (please print):
Score:
Part 1: Fill in the Blanks, Short Answer
(2 points) Scripts use variables from the
functions use
variables from :
(1 point) Matlab checks the
or the Matlab search path to
find functions.
(3 points) The three types of functions include:
which are
predefined in Matlab:
which are saved as separate m-files;
and
which are placed at the bottom of a script.
(4 points) The function definition line is written as follows:
Write what Matlab will output for the following script commands that call the standalone
function CalcAreaCircum. Enclose arrays in square brackets. Use commas or semicolons to
indicate arrays. If an error results, explain why. You may use Matlab to check your answers.
function [area, circumference]= CalcAreaCircum(rad)
% Calculates area and circumference for circle of provided radius
area = pi **rad***rad;
circumference =2** pi ** rad;
end
(2 points) CalcAreaCircum(1)
points)[A,C]= CalcAreaCircum(1)
(2 points)[area, circum]= CalcAreaCircum ([1,2])
(2 points)[A,C]= CalcAreaCircum (1,2)
points)r=1:3;[A,C]=CalcAreaCircum(r)
 Name (please print): Score: Part 1: Fill in the Blanks, Short

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!