Font size
WorksheetsBFM3002 - QUIZ 2
Total questions: 12
Worksheet time: 8mins
the output line will be ?
the output line will be ?
Which statement is wrong
ans is automatically created by MATLAB when a calculation is not saved in a variable
ans is created by MATLAB when executing code without a semicolon
ans can have any datatype
ans is a variable name
Which command in MATLAB performs matrix operation on elements?
a’
a.*b
a^3
a_4
How often will it beep?
1
2
3
4
How often will it beep now?
1
2
3
4
What is the value of count after the loop?
The loop will have no end
0
4
There will be an error message
command = {'Name: ', 'Activity: '};
Why do we need a cell array here?
We store character arrays of different lengths
We store different data types
We don't need a cell array - we could use a normal array
For content indexing
Create a 2-D line plot is done by using command ...
disp
graph
plot
fplot
A 'circle' plot can be created by using the following command
pos = [2 4 2 2];
rectangle('Position',pos,'Curvature',[1 1])
axis equal
pos = [2 4 2 2];
circle('Position',pos,'Curvature',[1 1])
axis equal
