Looks like no one added any tags here yet for you.
What will be the output of the code all
([1 0 1 0])?
0
What is the output of the code 2 * 0 ^ 0 + 9?
11
What will be the output of the code Inf (74 & sin(nan))?
error
What will be the output of the code all([NaN])?
error
What will be the output of the code xor(3476, 1234)?
1
What will be the output of the code any(sin(0), NaN)?
1
What will be the output of the code all(sin([pi]))?
1
The correct hierarchy of operation is:
>>=&1
Predominantly, what are the two kinds of errors in MATLAB programs?
syntax and runtime
Which code would you use to find the value of the function f(x) = sin(x) + cos(x) + tan(x) at x = 1?
sin(45) + cos(d45) + tand(45)
What command in MATLAB is used to create new variable?
var
The num2str command means
converts a number to string
To display ‘Question 2’ in command window, the correct command is
disp (‘Question 2’)
To add comment to the mfile, the MATLAB command
%
What is the name of a primary function?
Name of M.file
What are persistent variables?
variables which retain values between calls to the function
Which command can be used for single step execution in debugging mode?
dbstep
How do we access a global variable in nested functions?
declare the variable as global
How does MATLAB help in passing function arguments?
by call by value and call by reference
What is the default variable while evaluating transfer function?
s
What is the default variable while evaluating Laplace transform?
s.
The output of the following code is
laplace(exp(-3*p))
error due to p
The output of the following code is
solve('w+z=0')
-z
The default variable in case of solve (‘f(x,y,p,a,l)’ ) command is
x
What is the default parameter for dsolve() command
input differentiating variable
What is the default parameter for the ‘ztrans()’ command
z
What is the output of the following code? syms x; laplace(exp(-3x),x,y)
error
Matlab allows modeling of different control systems using
simulink
How to stop the execution of a chain of commands
press ctrl + c
What are MEX files in MATLAB?
Allows the user to combine C source files with MATLAB
How would you plot multiple graphs in MATLAB?
using the held function
How do you show the program of a MAT file
the program cannot be shown while running a MEX file
What is the equipment of subplot (1,1,1)?
axes
The command used to reflect film from disk into the workspace is
load
The format for 5 digit representation along with exponent is
short -e
Which operator in c used to prevent the printing of insignificant terms?
%g
The function to plot a graph with both axes logarithmic scale is
loglog
We can plot a discrete and continuous relationship in the same graph
false
it not possible to store graph as MAT file
How do we break from an infinite loop without keeping a break statement within the loop?
press Ctrl + C
The nature of complex input taken by the sparse() command is
sparse
What is the attribute of sparse matrix?
imaginary & real part
which of the following can be the space taken up by sparse matrix
25 MB
A sparse identity matrix is generated by which command?
speye
Which command is used to generate a sparse normally generated matrix?
sprandn
What is the output of the following code?
The non-zero elements in sparse matrix are shown by which command?
What is the output of the following code?
A = [0 Inf Inf 0 0; 2 9 7 0; sin (Inf) 8 0 0];
P = sparse (A); nnz (P)
Imemory > amemory
The size of the sparse matrix will be ____ the original matrix.
equal
The maximum space allocated for sparse matrix is given by which command?
nzmax
Which matrix has most of the elements (not all) as zero.
sparse matrix
What is the relation between Sparsity and Density of a matrix?
Sparsity = 1 - Density
Who coined the term Sparse Matrix?
Harry Markowitz
The matrix contains in rows and n columns. The matrix is called Sparse matrix if
Total No. of Zero elements > (m*n)/z
Which of the following is not the method to represent Sparse matrix?
heap
Is Sparse matrix also known as Dense matrix?
false
Which one of the following is a Special Sparse matrix?
band matrix
in what way the Symmetry Sparse matrix can be stored efficiently?
binary tree
The output of the following command is
a = [123; 400; 309]; spy(A)
Executing in the command window the following code returns
a = [1:3]; size(a)
3 1
Command used to save command window text to file
diary
Executing in the editor window the following code returns
a = 1; sin(a)
0.8415
Which is invalid variable name in MATLAB?
6x
Command used to display the value of variable x
disp(x)
What command is used to clear a command window
clc