Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

MATLAP QUESTION

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


A. pi
B. inf
C. i
D. gravity
2. To print a newline in a fprintf statement, you must use the following escape character:
A. t
B. nl
C. nxt
D. n
3. What are the characters in Matlab are represented in their value in memory?
A. decimal
B. ASCII
C. hex
D. string
4. Which one of the following lists contains only legal MATLAB variable names?
A. year-2012, time
B. myTime, 1stVar
C. MyScore1, student1_ID
D. 2nd_Var, my_currency
5. This Matlab command clears all data and variables stored in memory:
A. clc
B. clear
C. delete
D. deallocate
6. What does MatLab consist of?
A. MatLab Language
B. MatLab working environment
C. Handle Graphics
D. All of the above
7.  What are the things for which MATLAB can be used
A. Performing very simple calculations
B. Plotting mathematical relationships in two dimensional and three dimensional
C. For operations of matrix
D. All of these
8. Which one of the following is a legitimate variable names in MATLAB?
A. tax-rate
B. exam1.1
C. _input
D. sin
9. Which of the following MATLAB calculations would result the value 1?
A. 6/2*3
B. 3^2/3*3
C. 1+2+3/1+2+3
D. None of the above
10. Which of the following MATLAB expression gives -1.?
A. cosd(pi)
B. sind(3*pi/2)
C. sin(-pi/2)
D. None of the above
11. Which of the following is used to see if two elements are equal in MATLAB?
A. !=
B. ==
C. isequal
D. =
12. If the coefficient matrix of a linear system has rank 4, and the augmented matrix has rank 5,
then:
A. The system has infinitely many solutions
B. The system is inconsistent
C. There are fewer variables than equations
D. The system is homogeneous
13. What is the output of the following code?
A .No output
B. Error
C.Yeah !
D. Output suppressed
14. Which command can be used to generate multiple graphs in the same window?
A. hold on
B. wait
C. not possible without contour command
D. not possible
15.  Which toolbox provides the plot command?
A. Symbolic Maths Toolbox
B.Signal Processing Toolbox
 C.Engineering Toolbox
D. Functions
16. What is the default range used by the fplot command?
A. [-5,5]
B. (-5,5)
C. No default range
D. No such command
17. Which is the invalid variable name in MATLAB?
A. x6
B. last
C.6x
D. z
18. The space located for the matrix generated from the spones command is ?
A. Same as a sparse matrix
B.Same as the original matrix
C. Same as an identity matrix
D. Double that of the sparse matrix
19. The difference between a function and a script is ?
A. only a function file can be run from the command line
B. only a function requires inputs
C. only a script file can perform a series of commands
D. function variable names only have meaning within the function, whereas script variables
are available to other programs
20. Which of the following determines the number of elements N of the matrix B?
A. N = elem(B)
B. N = prod(size(B))
C. N = numel(B)
D. Both B and C
21. . A student does an experiment to measure the change in a pendulum’s oscillation period
with the length of the pendulum. What is the most appropriate excel chart type to display this data?
A. Line
B. Scatter
C. Column
D. Donut
22. How can we close all graphs in MATLAB?
A. Using the close command
B. Using the clear all command
C. Using the close all command
D. Using the clear command
23. Which will give a hint that the file is closed.?
A. Fopen
B. Fclose
C. Gclose
D. clc
24.  MATLAB stands for?
A. matrix laboratory
B. math library
C. matric library
D. matrix library
25. To determine whether an input is MATLAB keyword, command is?
A. iskeyword
B. key word
C. inputword
D. isvarname
26. Command is used to save command window text to file.
A. saveas
B. texttofile
C. diary
D.  todiary
27. To stop the execution of a MATLAB command, used keys?
A. ctrl+c
B. ctrl+s
C. ctrl+b
D. ctrl+enter

You might also like