Professional Documents
Culture Documents
Sa1.0 CS10-8L
Sa1.0 CS10-8L
0_P1 (M1)
Question 1
5 out of 5 points
It used to stop execution in Matlab.
Question 2
0 out of 5 points
Which of the following is a constraint in MATLAB?
Question 3
5 out of 5 points
To access the first element in a vector named q ( assume that the vector is nonzero) , the command is
Question 4
5 out of 5 points
A function is not returning values corresponding to desired input values. What should be the
correction?
Question 5
5 out of 5 points
What are the concepts for which MATLAB can be used ?
C. operations on polynomials
Question 6
5 out of 5 points
What is the extension of script files?
Question 7
5 out of 5 points
A pair of parentheses is used after the function’s name to enclose
Question 9
5 out of 5 points
Writing a function file, you are repeatedly calling a function file but gets no output. What is the possible
error?
Question 10
0 out of 5 points
What will the "loadm1" command do?
Question 11
5 out of 5 points
Which of the following is used to store the complex number?
Question 12
0 out of 5 points
How do you create a function file in MATLAB?
Question 13
0 out of 5 points
MATLAB allows the following EXCEPT
Question 14
0 out of 5 points
To create a row vector containing the integers from 1 to 15, the _____ operator is used.
Question 15
0 out of 5 points
How would you set-up a debugger in MATLAB?
SA1.0_P2(M1)_A14
Question 1
4 out of 4 points
Create an array of logical values.
A = 1 0 1
1 1 0
B = cumprod(A,2);
Question 2
4 out of 4 points
What would be the output of the following code (in editor window)?
A = [1 1 0 0];
B = [1 ;2 ;3 ;4];
C=A*B;
Question 3
4 out of 4 points
What would be the output of the following code (in editor window)?
a=1:5; c=a.^2;
Question 4
4 out of 4 points
What would be the output of the following code (in editor window)?
A = [0 1; 1 0] ; B=2 ; C = A + B
Question 5
4 out of 4 points
Executing in the command window the following code returns.
a = [1:3]';
size(a);
Question 6
4 out of 4 points
To stop the execution of a MATLAB command, used keys?
Question 7
4 out of 4 points
Which command is used to clear a command window?
Question 8
4 out of 4 points
Command used to display the value of variable x.
Question 9
4 out of 4 points
Which symbol is used to initialize a variable?
Question 10
4 out of 4 points
All MATLAB computations are done in
Question 11
0 out of 4 points
To stop execution in MATLAB, use
Question 12
4 out of 4 points
What are mathematical expressions?
Question 13
0 out of 4 points
How many expressions are there in the following mathematical relation?
a=sqrt(log(sqrt(x+y)))
Question 14
4 out of 4 points
Predominantly, what are the two kinds of errors in MATLAB programs?
Question 15
0 out of 4 points
If the dimensions of vectors don't match, the plot command will always give an error.
Question 16
4 out of 4 points
Variables need to have same name while being passed from the primary function to the sub-function.
Question 17
4 out of 4 points
What is the best way to think about a "Syntax Error" while programming?
Question 18
4 out of 4 points
What value does the variable q contain after the Matlab code below executes?
A = [ 1 3 5 ];
B = [ 2 4 6 ];
q = diff(A);
Question 19
4 out of 4 points
The command shown below will produce what output?
They are:
Question 21
4 out of 4 points
Two way selection is implemented with the _________________ statement.
Question 22
4 out of 4 points
What does the variable q contain after the Matlab code below executes?
A = [ 1 3 5 ];
[q r] = myfunc(A)
% end
% function file
n = length(p1);
r1 = sum(p1)./n;
r2 = sqrt(sum((p1 - r1).^2)./n);
return;
end
Question 23
4 out of 4 points
This Matlab commands clears all data and variables stored in memory:
Question 24
4 out of 4 points
What Matlab command is best used to execute a set of commands a single time based upon certain
conditions being met?
Question 25
4 out of 4 points
The logical operator is true only when both operands are true.
Question 26
3 out of 3 points
A + B is possible ; A =[ 5 2 3 4; 4 6 7 8] & B=[ 8, 7,6,4; 3,1 5].
Question 27
3 out of 3 points
When performing matrix multiplication, inner dimensions must be equal.
Question 28
4 out of 4 points
A “debugger” helps us locate and correct that line of code.