Variables and Assignments MCQ’s

Read Time:1 Minute, 15 Second

This set of MATLAB Multiple Choice Questions & Answers (MCQs) focuses on “Variables and Assignments”.

1. Which is an escape sequence constant?
a) Esc
b) /n
c) \b
d) nargout

2. Choose the correct option.
a) any() shows all the elements in a matrix while all() shows every element of a vector
b) any() is ‘true’ if elements in a vector is zero
c) all() is ‘true’ if every element in a vector is non zero
d) all() is ‘true’ if every element in a vector is 0

3. What is the difference between the expressions (9*1-8) & (9-1*8)?
a) Computational difference
b) Final results are different
c) No difference
d) Cannot be determined

4. Which symbol is used to initialise a variable?
a) =
b) ->
c) ==
d) init

5. Which function is preferable to find the magnitude of a complex number?
a) abs()
b) sqrt()
c) cart2pol()
d) MATLAB does not support complex arguments

6. What operator helps in the transpose of a matrix?
a) “ .’ ”
b) “ ‘ ”
c) “./ ”
d) “ .\ ”

7. The expression cos(90) is equal to1 in MATLAB.
a) True
b) False

8. All MATLAB computations are done in
a) Single Precision
b) Double Precision
c) Linear accuracy
d) Multi-level precision

9. What is the output of the expression

(2*9*Inf)+(9-1*Inf)

a) Inf
b) Error
c) Incomprehensible
d) NaN

10. Evaluate the expression:

a=9/1*5/1;  b=a*a/a*a; c=sind(30)+1/2;  d=1-c; e=a+b*c-d

a) 2045
b) 2070
c) Error since sind() is a wrong function
d) 0

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous post Errors in Input – 2 MCQ’s
Next post Solving Equations MCQ’s