Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

BFM3002 - QUIZ 1

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.
A=[1 2 3 4 5];
a)
A is Row Vector
b)
A is Column Vector
2.
A=[1;2;3;4;5];
a)
A is Row Vector
b)
A is Column Vector
3.
floor(14.8) =
a)
14.8
b)
15
c)
14
d)
0.8
4.
A=[14  12  15;
        34  25  35;
        94  51  75;
        40  52  55]
What is the dimension of A ?
a)
4x3
b)
3x4
c)
4x4
d)
3x3
5.
round(14.8) =
a)
14.8
b)
15
c)
14
d)
0.8
6.
A=[14  12  15;
        34  25  35;
        94  51  75;
        40  52  55]
How many elements greater than 14 ?
a)
9
b)
10
c)
11
d)
12
7.
5*2^2*5 =
a)
100
b)
300
c)
500
d)
1000
8.
A=[14  12  15;
        34  25  35;
        94  51  75;
        40  52  55]
How many elements less than 14 ?
a)
1
b)
2
c)
3
d)
4
9.
what is the output of this command
5 < 9  
a)
5
b)
9
c)
1
d)
0
10.

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)?

a)

2 3

6 7

b)

3 4

7 8

c)

6 7

10 11

d)

7 8

11 12

11.
What is the result of this command
12 < 14
a)
1
b)
0
c)
12
d)
14
12.
What is the result of this command
3 ^ 2 * 3 ^ 2
a)
81
b)
36
c)
216
d)
6
13.
What is the result of this command
sin(pi/2) + cosd(0)
a)
2
b)
0
c)
1
d)
infinity
14.
A=[14  12  15;
        34  25  35;
        94  51  75;
        40  52  55]
How many even numbers in A?
a)
6
b)
7
c)
8
d)
9
15.
A=[14  12  15;
        34  25  35;
        94  51  75;
        40  52  55]
sort(A,2), will sort A in what order ?
a)
columns-ascending
b)
columns-descending
c)
rows-ascending
d)
columns-descending
16.

Figure below is a flowchart symbol that states an ...

a)

Process

b)

Input/output data

c)

Decision

d)

Terminator

17.

The correct MATLAB mathematical operation symbols are...

a)

/ , + , x

b)

/ , - , *

c)

+ , - , :

d)

+ , x , *

18.

The matrix transpose for the matrix A is ...

a)
b)
c)
d)
19.

1. Vectors depend upon brackets while scalars don’t.

a)

True

b)

False

20.

Which symbol is used to initialize a variable?

a)

=

b)

->

c)

==

d)

init

21.

How many errors will MATLAB show if the following code entered?

A=[1;2;3]; B=[1 2]; C=A.*B;D=C*A;

a)

2

b)

1

c)

no error

d)

4

22.

Which operator set is used for left and right division respectively?

a)

.\ and ./

b)

./ and .\

c)

Left division and right division is not available in MATLAB

d)

/ and \

23.

What is the symbol used to evaluate the transpose of a vector?

a)

“ ^ ”

b)

“ * ”

c)

“ ‘ ”

d)

“ ~ ”

24.

What is the difference between a[] and a{}?

a)

a[] is for empty cell array while a{} is for empty linear array

b)

a[] is for empty linear array while a{} is for empty cell array

c)

No difference

d)

a[] is an empty row vector while a{} is an empty column vector

25.

1. What is the output of the following code?

A=[1 2 3..

];

a)

The output is suppressed

b)

A row vector

c)

A row vector concatenated with a null matrix

d)

Error

26.

All matrices are vectors but all vectors are not matrices in MATLAB.

a)

True

b)

False

27.

Which of the following statements is correct?

a)

Function 'clear' clears only the scalar variables, but does not clear arrays

b)

Function 'clc' clears all variables

c)

Function 'clc' clears only constants

d)

Function 'clear a' clears all variables of the type array

e)

None of the above

28.

Executing the following code returns:

a = [1:3:10] ;

size(a)

a)

1

b)

[10 1]

c)

[1 4 ]

d)

4

29.

What is the result of the following code:

M = [1,2,3; 4,5,6; 7,8,9];

numel(M)

a)

3

b)

3 3 3

c)

9

d)

3 3

30.

The output of cat=[‘cat’ ‘dog’] is

a)

Cat&dog

b)

Cat dog

c)

Catdog

d)

Cat

Dog