Q-If one operand is a scalar and the other is not, then MATLAB applies the scalar to every element of the other operand. This property is known as ______________
a) operand divergence
b) scalar expansion
c) vector expansion
d) dimension declaration
………….
Answer: b
Explanation: If one operand is a scalar and the other is not, then MATLAB applies the scalar to every element of the other operand. This property is known as scalar expansion because the scalar expands into an array of the same size as the other input, then the operation executes as it normally does with two arrays.
Q-Conversion Function int16 uses_________ range of value?
a) -27 to 27-1
b) -215 to 215-1
c) -231 to 231-1
d) 0 to 216-1
………….
Answer: b
Explanation: Conversion Function int16 having class of signed 16-bit integer. And signed 16-bit integer follows -215 to 215-1 range.
Q-MATLAB sees a ________ ordered variable as a vector of dimension n*1.
a) nth, (n+2)th
b) nth, (n+3)th
c) (n-1)th, nth
d) nth, (n-1)th
………….
Answer: c
Explanation: The row vector which consists of the co-efficients of variables of a (n-1)th ordered polynomial in descending order is an nx1 vector where the last term is a constant term of the expression. The rest of the options are incorrect by the above statement.
Q-Name the functions used, for multiplication and division of two polynomials in MATLAB.
a) conv() and deconv()
b) mult() and div()
c) conv() and div()
d) mult and div
…………
Answer: a
Explanation: Multiplication in a time domain is convolution in a frequency domain. This is the reason for the existence of MATLAB functions conv(), for multiplication of signals, and deconv() for division of signals. There are no functions like mult() and div().
Q-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: a
Explanation: whos returns the name, size, bytes and class of the variables used in the current program. To get the value of any variable, we need to type the variable and press Enter.
Q-Which function is preferable to find the magnitude of a complex number?
a) abs()
b) sqrt()
c) cart2pol()
d) MATLAB does not support complex arguments
………….
Answer: a
Explanation: In the function sqrt(), we have to write the polynomial which shows the sum of squares of the real and imaginary part within the parentheses. But in abs(), we only have to enter the variable which we’ve used to define the complex number. So abs() is more preferred.
Q-Which is an escape sequence constant?
a) Esc
b) /n
c) \b
d) nargout
……..
Answer: c
Explanation: An escape sequence character constant is used in functions which are used to show output. ‘\b’ means backspace. ‘Esc’,‘/n’, are strings. ‘nargout’ is a pre-defined function in MATLAB.
Q-All MATLAB computations are done in
a) Single Precision
b) Double Precision
c) Linear accuracy
d) Multi-level precision
……….
Answer: b
Explanation: MATLAB stores any integer variable as a double data type of 64 bits. For single precision, the function is ‘single()’ but if not mentioned, the value will be stored in double precision.
Q-Which symbol is used to initialise a variable?
a) =
b) ->
c) ==
d) init
…………..
Answer: a
Explanation: The symbol, ‘=’, is used to initialise a variable with a particular data type. ‘==’ checks whether the left hand side is equal to its’ right hand side. ‘init’ is a separate function in MATLAB.
Q-MATLAB stands for?
a) matrix laboratory
b) math library
c) matric library
d) matrix library
…………..
Answer: a
Explanation: MATLAB stands for matrix laboratory which is multi-paradigm numerical computing environment and fourth-generation programming language.
Q-Which command is used to clear a command window?
a) clear
b) close all
c) clc
d) clear all
…………..
Answer: c
Explanation: clc clears all input and output from the Command Window display and provide a “clean screen”. After using clc, you cannot use the scroll bar to see the history of functions, but you still can use the up arrow key, ↑, to recall statements from the command history.
Q- To determine whether an input is MATLAB keyword, command is?
a) iskeyword
b) key word
c) inputword
d) isvarname
………….
Answer: a
Explanation: Command iskeyword uses the MATLAB command format. iskeyword returns a list of all MATLAB keywords. It gives output in the form of 1 and 0.
Q-Command is used to save command window text to file.
a) saveas
b) texttofile
c) diary
d) todiary
…………
Answer: c
Explanation: The diary function creates a log of keyboard input and the resulting text output, with some exceptions. The output of diary is an ASCII file, suitable for searching in, printing, inclusion in most reports and other documents.
Q-To stop the execution of a MATLAB command, used keys?
a) ctrl+c
b) ctrl+s
c) ctrl+b
d) ctrl+enter
………………..
Answer: a
Explanation: Ctrl+C stop execution for files that run a long time, or that call built-ins or MEX-files that run a long time. Ctrl+Break is also used to stop the execution.
Q-Which is the invalid variable name in MATLAB?
a) x6
b) last
c) 6x
d) z
…………
Answer: c
Explanation: A valid variable name starts with a letter, followed by letters, digits, or underscores. MATLAB is case sensitive, so A and a are not the same variables, and in 6x digit is followed by a letter which is invalid.
NEXT////