Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

) Which of the following statement is true 9) A) Variable a and A will be diferr

ID: 3723880 • Letter: #

Question

) Which of the following statement is true 9) A) Variable a and A will be diferrent variables since MATLAB is case sensitive B) Changing variable case when we define them would make no difference C) MATLAB is intelligent enough to know what you define and use variable accordingly. D) All of the statements above are true 10) Which of the following windows display previous command you have entered? 10) A) Command Windovw C) Old Command Window B) History Window D) Command History Windorw 11) The file type that we save MATLAB programs in is called a: A) Function file B) Code file C) M-file D) X-file 12) Which of the following characters is used by user to denote the following typing is a MATLAB 12) comment A) C)~ D)% 13) MABLAB comment does what function in MATLAB script file? 13) A) MATLAB ignores those lines for executing and used for script documentation B) MATLAB looks into those comment line more detailed and process them C) Comment lines are used for both documentation and execution D) None of the statements above true 14) If you want to supress printing result in MATLAB command window, Which of the following 14) symbol is used A) B) x 15) After the code below executes, what does the variable x1 contain? a=3; b=4; x1=sqrt(a .^ 2 + b .^ 2); A) 7 C) 5 B)-1 D) some number that is not-1,0,1 16) Which of the following is NOT an acceptable name for a Matlab variable? 16) A) 2index D) index 2 B) INDEX C) index 17) What value does the variable q contain after the Matlab code below executes? 17) a = 5; q = a.*a; q=q+2; A) nothing operation is not possible C) 25 B) 27 D) 17

Explanation / Answer

9) A

Matlab is case sensitive. A nd a are not the same

10) D

Command History Window gives log of commands before last editor close.

11)C

MATLAB filesa re saved as M-File u cans ee in MATLAB editor , when you create a new file it is by default created as M-fILE.

X-File is to read audio from file

12)D

% is used to represent comments in MATLAB code. Lines start with % and end with % are termed as comments and are used as effectve documentation.

Block Comments - %{ and %} operators must appear alone on the lines that immediately precede and follow the block of help text

To comment out part of a statement that spans multiple lines, use an ellipsis (...) instead of a percent sign

13)A

In live scripts, you can also describe a process or code by inserting lines of text before and after code. Text lines provide additional flexibility such as standard formatting options, and the insertion of images, hyperlinks, and equations

14)C

Use semicolons to separate rows in an array creation command, or to suppress the output display of a line of code.

15)C

A.^B also termed as power(A,B) is an alternate way to execute A.^B, but is rarely used. It enables operator overloading for classes.

16)A

A valid variable name starts with a letter, followed by letters, digits, or underscores.

17)A

A.*B multiplies arrays A and B element by element and returns the result in C.