Matlab Objective Questions and Answers
Matlab Multiple Choice Questions and Answers Pdf Download for Exam Matlab MCQs Quiz Matlab Test Questions
1. What does Matlab stand for?
A. Math Laboratory
B. Matrix Laboratory
C. Mathworks
D. Nothing
E. none of the above
2. What symbol precedes all comments in Matlab?
A. “
B. %
C. //
D. <
E. none of the above
3. Which of the following is not a pre-defined variable in Matlab.
A. pi
B. inf
C. i
D. gravity
E. j
4. This Matlab command clears all data and variables stored in memory:
A. clc
B. clear
C. delete
D. deallocate
E. none of the above
5. Characters in Matlab are represented in their value in memory.
A. decimal
B. ASCII
C. hex
D. string
E. none of the above
6. Which is these is not an aspect of a for/while loop:
A. update
B. initialization
C. runner
D. condition
E. all are aspects of loops
7. To better manage memory and prevent unnecessary memory allocations, Matlab uses:
A. vectors
B. scalars
C. matrix math
D. delayed copy
E. licenses
8. To print a newline in a fprintf statement, you must use the following escape character:
A. \t
B. \nl
C. \nxt
D. \n
E. none of the above
9. In Matlab, this keyword immediately moves to the next iteration of the loop:
A. update
B. goto
C. continue
D. break
E. none of the above
10. Which of the following will correctly define x, y, and z as symbols?
A. sym (x, y, z)
B. syms x y z
C. syms x, y, z
D. sym x, y, z
E. none of the above
11. Which of these is the way to access the first element in a vector named v (assuming there is at
least one element in the vector)?
A. v(0)
B. v(1)
C. v
D. v(: , 0)
E. none of the above
12. Which of the following is used to see if two elements are equal in MATLAB?
A. !=
B. ==
C. isequal
D. =
E. none of the above
13. If vector = [1 2 3 4; 11 24 92 100; 345 65 90 1]. What will the value of a be equal to if this
code is entered into MATLAB >>[a b] = size (vector)?
A. 1 2 3 4
B. 12
C. 1
D. 4
E. 3
14. What is the value of ans that is printed when the following code is run: isnumeric(32)
A. 1
B. 0
C. 32
D. yes
E. true
15. If I want to save a formatted string to memory, but don’t want to print it out, which
command should I use?
A. fprintf
B. sprintf
C. disp
D. echo
16. To add a comment to the mfile, the MATLAB command is
A. %
B. ;
C. comment(‘ ‘)
D. &
17. When used in the fprintf command, the %g is used as the
A. single character display
B. fixed point display
C. string notation display
D. default number display
18. When used in the fprintf command, the \n is used to
A. add a space between any two characters
B. add a line space (enter key)
C. place a number into the comment
D. clear the comment
19. To display ‘Question 2’ in the command window, the correct command is
A. disp(Question 2)
B. display(‘Question 2’)
C. disp(‘Question 2’)
D. Question 2
20. The clc command is used to
A. clear the command window
B. erase everything in the mfile
C. clean the desktop
D. save the existing mfile
21. The num2str command
A. converts a number to string
B. converts string to a number
C. concatenates numbers and strings
D. concatenates strings
22. The output of the last line is
aa=2
as=num2str(aA.
cat=[‘cat’ as]
A. cat2
B. cat 2
C. ??? Undefined function or variable ‘as’
D. cat aa
23. To join one or more strings into a single string is known as
A. concatenation
B. joining
C. string conversion
D. string theory
24. The output of
cat=[‘cat’ ‘dog’]
is
A. catdog
B. cat dog
C. cat&dog
D. CatDog