Are you looking for MATLAB Questions and Answers for the Objective and MCQ exam? If yes, here you will find hundreds of MATLAB MCQ Questions along with its answer. This article will also help you with MATLAB Quiz Objective answers in the easiest ways.

The correct answers are marked in Green Color with a tick mark so that you don’t get confused about the correct answer to the question.

Use CTRL + F or Find In Page to find questions & answers.

MATLAB Questions and Answers

MATLAB Objective and MCQ Questions Answers

1. What does Matlab stand for?

  1. Math Laboratory
  2. Matrix Laboratory
  3. Mathworks
  4. Nothing
  5. None of the above

2. What symbol precedes all comments in Matlab?

  1. %
  2. //
  3. <
  4. None of the above

3. Which of the following is not a pre-defined variable in Matlab?

  1. pi
  2. inf
  3. i
  4. gravity
  5. j

4. This Matlab command clears all data and variables stored in memory:

  1. clc
  2. clear
  3. delete
  4. deallocate
  5. none of the above

5. Characters in Matlab are represented in their value in memory.

  1. decimal
  2. ASCII
  3. hex
  4. string
  5. none of the above

6. Which is these is not an aspect of a for/while loop:

  1. update
  2. initialization
  3. runner
  4. condition
  5. all are aspects of loops

7. To better manage memory and prevent unnecessary memory allocations, Matlab uses:

  1. vectors
  2. scalars
  3. matrix math
  4. delayed copy
  5. licenses

8. To print a newline in a fprintf statement, you must use the following escape character:

  1. \t
  2. \nl
  3. \nxt
  4. \n
  5. none of the above

9. In Matlab, this keyword immediately moves to the next iteration of the loop:

  1. update
  2. goto
  3. continue
  4. break
  5. none of the above

10. Which of the following will correctly define x, y, and z as symbols?

  1. sym (x, y, z)
  2. syms x y z
  3. syms x, y, z
  4. sym x, y, z
  5. 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)?

  1. v(0)
  2. v(1)
  3. v
  4. v(: , 0)
  5. none of the above

12. Which of the following is used to see if two elements are equal in MATLAB?

  1. !=
  2. ==
  3. isequal
  4. =
  5. 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)?

  1. 1 2 3 4
  2. 12
  3. 1
  4. 4
  5. 3

14. What is the value of ans that is printed when the following code is run: isnumeric(32)

  1. 1
  2. 0
  3. 32
  4. yes
  5. 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?

  1. fprintf
  2. sprintf
  3. disp
  4. echo

16. To add a comment to the mfile, the MATLAB command is

  1. %
  2. ;
  3. comment(‘ ‘)
  4. &

17. When used in the fprintf command, the %g is used as the

  1. single character display
  2. fixed point display
  3. string notation display
  4. default number display

18. When used in the fprintf command, the \n is used to

  1. add a space between any two characters
  2. add a line space (enter key)
  3. place a number into the comment
  4. clear the comment

19. To display ‘Question 2’ in the command window, the correct command is

  1. disp(Question 2)
  2. display(‘Question 2’)
  3. disp(‘Question 2’)
  4. Question 2

20. The clc command is used to

  1. clear the command window
  2. erase everything in the mfile
  3. clean the desktop
  4. save the existing mfile

21. The num2str command

  1. converts a number to string
  2. converts string to a number
  3. concatenates numbers and strings
  4. concatenates strings

22. The output of the last line is

aa=2
as=num2str(aa)
cat=[‘cat’ as]

  1. cat2
  2. cat 2
  3. ??? Undefined function or variable ‘as’
  4. cat aa

23. To join one or more strings into a single string is known as

  1. concatenation
  2. joining
  3. string conversion
  4. string theory

24. The output of
cat=[‘cat’ ‘dog’]
is

  1. catdog
  2. cat dog
  3. cat&dog
  4. CatDog

25. What are MEX files in MATLAB?

  1. No such thing as MEX files
  2. Helps to analyse commands in MATLAB
  3. Allows the user to combine C source files with Matlab files
  4. Same as MAT files

26. How to stop the execution of a chain of commands?

  1. Press Ctrl +C
  2. Cannot be stopped
  3. Only usage of debugging mode is possible in MATLAB
  4. Quit

27. MATLAB allows modelling of different control systems using ___________

  1. Simulink
  2. Control System Toolbox
  3. Not available in MATLAB as of yet
  4. ezplot

28. What is not displayed by the Workspace?

  1. Time of variable generation
  2. Standard deviation of the variable values
  3. Class of the variables
  4. Nature of the variables

29. The function to close the windows containing graphs generated from MATLAB is ___________

  1. Close all
  2. Close graphs
  3. Delete graphs
  4. End all

30. What will the following set of commands do when they are present in a script file?

stem[y1,y2];
title(‘p’);
print -deps p
  1. Plot the discrete graph of y1 and y2
  2. There is no stem command in MATLAB
  3. Store the graph as a separate file
  4. Cannot be determined

31. What are the difference between the ‘help’ and the ‘look for’ command?

  1. No difference
  2. Syntactical difference
  3. Help returns the entire set while look for returns specific commands
  4. Help returns all the toolbox while look for returns a single toolbox

32. Where do we need to store a function to call it in other programs?

  1. The bin folder
  2. Anywhere
  3. The MATLAB folder
  4. Desktop

33. To display comments of M-file, we use ___________

  1. echo on
  2. comment on
  3. show %
  4. Cannot be displayed

34. To add comments in MATLAB, use _________

  1. //
  2. %/
  3. /%
  4. %

35. Which functions help you to save and load variables?

  1. >> save Lays [a,b]
    >> load(‘myfile.mat’)
  2. >> save Lays {a b}
    >> load myfile.mat
  3. >> save Lays “a,b”
    >> load(myfile.mat)
  4. >> save Lays a b
    >> load(‘myfile.mat’)

Wrap Up

I’m assuming this article would be helpful for you to find all the MATLAB Questions and Answers [Updated Objective & MCQ]. If this article helped you in any way, then make sure to share it with your friends on social media and let them know about this free training.

Leave a Reply

Your email address will not be published.