wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

BFM3002 - QUIZ 2

Total questions: 12

Worksheet time: 8mins

Name
Class
Date
1.
plot(x,y,'--r')
the output line will be ?
a)
dashed-red
b)
dash dotted-red
c)
dotted-red
d)
solid-red
2.
plot(x,y,':b')
the output line will be ?
a)
dashed-blue
b)
dotted-black
c)
dotted-blue
d)
solid-blue
3.
A=[1 2 3 4 5];
a)
A is Row Vector
b)
A is Column Vector
4.
A=[1;2;3;4;5];
a)
A is Row Vector
b)
A is Column Vector
5.

Which statement is wrong

a)

ans is automatically created by MATLAB when a calculation is not saved in a variable

b)

ans is created by MATLAB when executing code without a semicolon

c)

ans can have any datatype

d)

ans is a variable name

6.

Which command in MATLAB performs matrix operation on elements?

a)

a’

b)

a.*b

c)

a^3

d)

a_4

7.

How often will it beep?

a)

1

b)

2

c)

3

d)

4

8.

How often will it beep now?

a)

1

b)

2

c)

3

d)

4

9.

What is the value of count after the loop?

a)

The loop will have no end

b)

0

c)

4

d)

There will be an error message

10.

command = {'Name: ', 'Activity: '};


Why do we need a cell array here?

a)

We store character arrays of different lengths

b)

We store different data types

c)

We don't need a cell array - we could use a normal array

d)

For content indexing

11.

Create a 2-D line plot is done by using command ...

a)

disp

b)

graph

c)

plot

d)

fplot

12.

A 'circle' plot can be created by using the following command

a)

pos = [2 4 2 2];

rectangle('Position',pos,'Curvature',[1 1])

axis equal

b)

pos = [2 4 2 2];

circle('Position',pos,'Curvature',[1 1])

axis equal