{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


ABCs_functions - answers(5 = a function out = myFunc...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function answers = ABCs_functions f % This time, answer true for yes/true or false for no/false. % % Example. Prof. Marsicano teaches CS 1371. example = true; e % Functions and scripts are both stored in M-files. answers(1) = a % Functions and scripts are essentially one and the same. answers(2) = a % Functions have thier own scope; that is, variables that are defined % inside a function do not affect the workspace in which the function is % run. answers(3) = a % Functions that I write will work even if they are not in my current % folder. answers(4) = a % Are the following function headers valid for the function myFunc? % function myFunc = [in1, in2]
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: answers(5) = a % function out = myFunc answers(6) = a % function [out two three] = myFunc(in) answers(7) = a % function [out] = myFunc(out) answers(8) = a % function (out two) = myFunc[in] answers(9) = a % function [out out2] = myFunc(in in2); answers(10) = a % If i have a valid function "myFunc" with the header: % function [out1 out2] = myFunc(in) % and I call [a b] = myFunc(13) from the command line. .. % % Is "a" defined in my workspace (have I assigned it a value in the % workspace)? answers(11) = a % Is "out2" defined in my workspace? answers(12) = a % Is "in" defined in my workspace? answers(13) =...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online