Input and Output

MATLAB

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

1. MATLAB stands for?
a) matrix laboratory
b) math library
c) matric library
d) matrix library

2. Which command is used to clear a command window?
a) clear
b) close all
c) clc
d) clear all

3. To determine whether an input is MATLAB keyword, command is?
a) iskeyword
b) key word
c) inputword
d) isvarname

4. Command used to display the value of variable x.
a) displayx
b) disp(x)
c) disp x
d) vardisp(‘x’)

5. Which of the following statements shows the result of executing the following line in the editor window?

size = [1 3]’        ;

size(size)

a) error
b) 1 3
c) 3 1
d) 3 3

6. Executing in the command window the following code returns.

 a = [1:3]’ ;
size(a)

a) error message
b) 1 3
c) 3 1
d) 31

7. Command is used to save command window text to file.
a) saveas
b) texttofile
c) diary
d) todiary

8. Executing in the editor window the following code returns.

a = 1;	sin(a)	a = 2;

a) 0.4815
b) 0.8415
c) 1
d) 0.9093

9. To stop the execution of a MATLAB command, used keys?
a) ctrl+c
b) ctrl+s
c) ctrl+b
d) ctrl+enter

10. Which is the invalid variable name in MATLAB?
a) x6
b) last
c) 6x
d) z

Leave a Reply

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