WorksheetsBFM3002 - QUIZ 1
Total questions: 30
Worksheet time: 15mins
34 25 35;
94 51 75;
40 52 55]
What is the dimension of A ?
34 25 35;
94 51 75;
40 52 55]
How many elements greater than 14 ?
34 25 35;
94 51 75;
40 52 55]
How many elements less than 14 ?
5 < 9
You have the matrix below:
A =
1 2 3 4
5 6 7 8
9 10 11 12
What will be displayed by the code: A(2:3,2:3)?
2 3
6 7
3 4
7 8
6 7
10 11
7 8
11 12
12 < 14
3 ^ 2 * 3 ^ 2
sin(pi/2) + cosd(0)
34 25 35;
94 51 75;
40 52 55]
How many even numbers in A?
34 25 35;
94 51 75;
40 52 55]
sort(A,2), will sort A in what order ?
Figure below is a flowchart symbol that states an ...
Process
Input/output data
Decision
Terminator
The correct MATLAB mathematical operation symbols are...
/ , + , x
/ , - , *
+ , - , :
+ , x , *
The matrix transpose for the matrix A is ...
1. Vectors depend upon brackets while scalars don’t.
True
False
Which symbol is used to initialize a variable?
=
->
==
init
How many errors will MATLAB show if the following code entered?
A=[1;2;3]; B=[1 2]; C=A.*B;D=C*A;
2
1
no error
4
Which operator set is used for left and right division respectively?
.\ and ./
./ and .\
Left division and right division is not available in MATLAB
/ and \
What is the symbol used to evaluate the transpose of a vector?
“ ^ ”
“ * ”
“ ‘ ”
“ ~ ”
What is the difference between a[] and a{}?
a[] is for empty cell array while a{} is for empty linear array
a[] is for empty linear array while a{} is for empty cell array
No difference
a[] is an empty row vector while a{} is an empty column vector
1. What is the output of the following code?
A=[1 2 3..
];
The output is suppressed
A row vector
A row vector concatenated with a null matrix
Error
All matrices are vectors but all vectors are not matrices in MATLAB.
True
False
Which of the following statements is correct?
Function 'clear' clears only the scalar variables, but does not clear arrays
Function 'clc' clears all variables
Function 'clc' clears only constants
Function 'clear a' clears all variables of the type array
None of the above
Executing the following code returns:
a = [1:3:10] ;
size(a)
1
[10 1]
[1 4 ]
4
What is the result of the following code:
M = [1,2,3; 4,5,6; 7,8,9];
numel(M)
3
3 3 3
9
3 3
The output of cat=[‘cat’ ‘dog’] is
Cat&dog
Cat dog
Catdog
Cat
Dog
