Explore topic-wise MCQs in Matlab.

This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Matlab knowledge and support exam preparation. Choose a topic below to get started.

1.

How would you express a pi as a character and an integer? Choose the correct code.

A. a=pi;b=’pi’;
B. a=22/7; b=pi;
C. a=3.1415; b=22/7;
D. a=3.1429;b=’pi’;
Answer» B. a=22/7; b=pi;
2.

What are Max and Min in the Workspace shown below?

A. They show the maximum and minimum value of the variable
B. The show the maximum and minimum length of the variable
C. They show the maximum and minimum value present in an array
D. They show the median and mode of the variable
Answer» D. They show the median and mode of the variable
3.

What is the conclusion from the following code?

A. The function ‘whos’ doesn’t show the values of the variables being used
B. The value of each variable is 0
C. The function ‘who’ is more effective than ‘whos’
D. Nothing can be concludedView Answer
Answer» B. The value of each variable is 0
4.

Choose the correct option as an inference from the following workspace view.

A. ‘ans’, ‘p’ and ‘ap’ are double variables
B. ‘ans’ and ‘p’ are double variables while ‘c’ is a character variable
C. ‘ap’ is symbolic object, ‘c’ is a double variable
D. ‘c’ is a symbolic character
Answer» C. ‘ap’ is symbolic object, ‘c’ is a double variable
5.

What is the size of double and symbolic variables holding integer constants?

A. 8 bytes and 16 bytes
B. 16 bytes and 112 bytes
C. 32 bytes and 26 bytes
D. 23 bytes and 112 bytes
Answer» B. 16 bytes and 112 bytes
6.

From the following desktop view of workspace, choose the correct code.

A. a=10;b=’pi’;syms c; d=[1,2;0;4];
B. a=10;b=’pi’;syms c; d=[1,2;0,4];c) a=10;b=pi;syms (
C. a=10;b=pi;syms (c); d=[1,2;0,4];
D. a=10;b=’pi’;syms c; d=[1,2;0,4];
Answer» B. a=10;b=’pi’;syms c; d=[1,2;0,4];c) a=10;b=pi;syms (
7.

What will be the output when the following code is written in MATLAB?

A. u and v are double with 8 bytes
B. u and v are symbolic objects
C. error
D. u and v are double arraysView Answer
Answer» B. u and v are symbolic objects
8.

THE_OUTPUT_WILL_SHOW_ALL_DOUBLE_VARIABLES?$

A. The output will show a and b as double and c as symbolic object
B. The output will show a and b as symbolic object and c as char
C. The output will show a and b as double variables and c as char variables
Answer» C. The output will show a and b as double variables and c as char variables
9.

What is the size of double and symbolic variables holding integer constants?$

A. 8 bytes and 16 bytes
B. 16 bytes and 112 bytes
C. 32 bytes and 26 bytes
D. 23 bytes and 112 bytes
Answer» B. 16 bytes and 112 bytes
10.

What is the difference between who and whos command?

A. The former shows the names of the variables being used while the latter shows the details of the variables in the ongoing program
B. The latter shows the the names of the variables being used while the former shows the details of the variables in the ongoing program
C. No difference at all
D. There is no such function as who and whos
Answer» B. The latter shows the the names of the variables being used while the former shows the details of the variables in the ongoing program
11.

What does the Workspace show?

A. Attributes of variables, functions from command window
B. Attributes of variables, script files from command window
C. Attributes of variables, script files, functions from command window
D. Attributes of variables from command window
Answer» B. Attributes of variables, script files from command window
12.

What is the replacement for the whos function?

A. Workspace window
B. Command window
C. Current folder window
D. Remembering all the variables used
Answer» E.
13.

A never gets stored in MATLAB

A. A is first stored and then removed from workspace
B. Error
C. A is retained in the workspace
Answer» D.
14.

What is the disadvantage of the whos function in MATLAB?

A. It does not show the values of the variable
B. It does not show the size of the variable
C. It does not show the class of the variable
D. It does not show the name of the variable
Answer» C. It does not show the class of the variable
15.

u and v are double with 8 bytes

A. u and v are symbolic objects
B. error
C. u and v are double arrays
Answer» B. error