Академический Документы
Профессиональный Документы
Культура Документы
INTRODUCTION TO MATLAB
A. Concept
Answer: C and E
Solution: Clear for remove items for workspace and then computer for indentify
version about computer on which MATLAB is running
Answer: A, C and D
Solution: answer B and E cannot for viewing a history of commands
4. MATLAB comes with three forms of online help except…
A. Help
B. Doc
C. Txt
D. Demos
E. Web browser
Answer: C and E
Solution: Answer C and E are not a form of help in Matlab
Answer : E
Solution : MATLAB stands for MATrix LABoratory
Answer : A and B
Solution : The standard MATLAB installation features features for scientific
and scientific data in 2-D and 3-D plots.
Answer : A and E
Solution : MATLAB also contains interactive tools to explore and analyze data.
10. MATLAB interacts with other applications (e.g. Microsoft Excel) and can be
called from
A. D code
B. E code
C. A code
D. B code
E. C code
Answer : E
Solution : MATLAB interacts with other applications (e.g. Microsoft Excel)
and can be called from C code, C +++ or Fortran programming language
11. Where we can run MATLAB under Mac OS X or Microsoft Windows operating
systems through a
A. PC
B. Computer
C. Handphone
D. Web Browser
E. Facebook
Answer : D
Solution : We can run MATLAB under Mac OS X or Microsoft Windows
operating systems through a web browser
12. When you start the MATLAB program, it displays the MATLAB desktop, What
is the desktop
A. For managing files
B. For variables, and applications associated with MATLAB
C. For calculate Erroring
D. For education
E. All wrong
Answer : A and B
Solution : The desktop is a set of tools (graphical user interfaces or GUIs) for
managing files, variables, and applications associatedwith MATLAB.
Answer : C
Solution : The Command History is a log of the commands we have executed in
the command window
Answer : A
Solution : Workspace consists of a set of variables stored in memory during a
MATLAB session.
Answer : A
Solution : To open the Workspace browser, select Desktop > Workspace in the
MATLAB desktop,or type >> workspace at theCommandWindow prompt
B. Calculation / Computation
Answer: A
Solution:
>> y = cos (0)
y=1
Answer: E
Solution:
>> y=sqrt (81) + sqrt (64)
y = 17
Answer: C
Solution:
>> (4 + (5^3*2^-2))/(2*9^0.5)
ans = 5.8750
Answer : A and B
Solution :
To find the roots, first we enter the coefficients of polynomial in to a row vector
p with p=[1, -7, 40, -34] and issue the r=roots(p) command. The following
shows the command
window output:
>> a = [ 1, -7, 40, -34 ]
a=
1 -7 40 -34
ans =
3.0000 + 5.0000i
3.0000 - 5.0000i
1.0 .0000i
Answer : C
Solution :
>> 6*(35^0.25) +14^0.35
ans =
17.1123
Answer : B
Solution :
>> a = 6*(10/13)
a=
4.6154
>> b = 18/35
b=
0.5143
>> c = 5*(9^2)
c=
405
>> a+b+c
ans =
410.1297
Short Solution :
>> 6*(10/13)+ (18/35) + (5*(9^2))
ans =
410.1297
Answer : A
Solution :
>> r = [1 -2 5 7 -14 35]
r=
1 -2 5 7 -14 35
>> q = [1 -2 5]
q=
1 -2 5
>> p = deconv(r,q)
p=
1 0 0 7
8. Let us calculate the cross of polynomial p(x) = x3+7 and q(x) = x2-2x+5
A. x5-2x4+5x3+7x2-14x+35
B. x3-9x2+5x+30
C. 90x7 - x5-2x4+5x3+7x2-14x+35
D. x5-9x4+9x3+6x2-14x+35
E. 5x3+7x2-14x+35
Answer : A
Solution :
>> p = [1 0 0 7];
q = [1 -2 5];
r = conv(p,q)
r=
1 -2 5 7 -14 35
10. You can use the left division operator in MATLAB to solve sets of linear
algebraic equations.
6 x + 12y + 4z = 70
7 x - 2y + 3z = 5
2 x + 8y - 9z = 64
A. x = 3
B. y = 5
C. z = -2
D. x = 4
E. y = 6
Answer : A, B, and C
Solution :
>> A = [6,12,4;7,-2,3;2,8,-9]
A=
6 12 4
7 -2 3
2 8 -9
>> B = [70;5;64]
B=
70
5
64
Solution =
3
5
-2
Answer: C
Solution: log10 for common logarithm (base 10) and log for natural logarithm
Answer: A, B, C, and D
Solution: Answer E is not correct because the correct mathematical operators
for left matrix division is \
Answer: B
Solution: Elements of a row vector are separated with blank or commas
Answer: A
Solution: Transposing a row vector with ‘ operator
Answer: C
Solution: Elements of a column vector is ended by a semicolon
6. What does mathematical operator “.*” (Dot Asterisk) in MATLAB used for ?
A. Division
B. Array Multiplication
C. Power
D. Right Array Divide
E. Left Array Divide
Answer : B
Solution : Mathematical operator “.*” (Dot Asterisk) in MATLAB used for
Array Multiplication (element-wise).
Answer : D
Solution : To get radians for trigonometrics function in MATLAB we have to
multiply degrees by pi/180. For example, to calculate cos(60), type
cos(60*pi/180).
8. In MATLAB, the numerical results in short are format displayed with .... digits
after the decimal point, while the long format produces .... digits after the
decimal point
A. 4 and 15
B. 3 and 15
C. 4 and 12
D. 3 and 12
E. 4 and 16
Answer : A
Solution : The numerical results in short format are displayed with 4 digits after
the decimal point, while the long format produces 15 digits after the decimal
point.
Answer : B
Solution : In MATLAB a named value is called variable.
10. Scalars and vectors in MATLAB are special cases of matrices, row vector is
having size ....
A. 1x1
B. 1xn
C. nx1
D. nxn
E. None of the answers above are correct
Answer : B
Solution : The size of row vector is 1xn.
11. Which one of the examples below is correct to type a 2x4 matrix ?
A. [3 6 9 12 2 4 6 8]
B. [3 6 9 12: 2 4 6 8]
C. [3 6 9 12* 2 4 6 8]
D. [3 6 9 12, 2 4 6 8]
E. [3 6 9 12; 2 4 6 8]
Answer : E
Solution : Matrices are typed in rows first and separated by semicolons to create
columns.
12. Functions that are built by simply adding together (or subtracting) some powers
function is called ....
A. Polynomials
B. Exponential
C. Trigonometry
D. Logarithmic
E. Sinusoidal
Answer : A
Solution : Functions that are built by simply adding together (or subtracting)
some powers function is called polynomials.
13. To split a long statement over multiple lines, at the end of the line we have to
enter ....
A. Three Back Slash “\\\”
B. Three Forward Slash “///”
C. Semicolons “;”
D. Three periods “...”
E. None of the answers above are correct
Answer : D
Solution : To split a long statement over multiple lines we have to enter three
periods “...” at the end of the line.
14. To separates the comments from the code, which symbols from the option below
we have to input?
A. :
B. ;
C. %
D. [ ]
E. ( )
Answer : C
Solution : The percent symbol “%” separates the comments from the code
15. Which one from the character below used for prioritize operations in MATLAB?
A. [ ]
B. ( )
C. < >
D. { }
E. None of the anwers above are correct
Answer : B
Solution : To prioritize operations in MATLAB, we have to input the “( )”
character
B. Calculation / Computation
1 1
. log 25 + . 𝑙𝑜𝑔10
6 3
A. -0.1003
B. -0,6725
C. 1,6801
D. 5.8900
E. -3.2837
Answer: A
Solution:
>> (1/6* log10(25))-(1/3*log10(10))
ans = -0.1003
Answer: D
Solution:
>> tan (pi/3)+ sin(165*pi/180)
ans = 1.9909
Answer: C
Solution:
p = 1 2 -3
>> r= roots(p)
r = -3.0000
1.0000
Answer: C
Solution:
>> A = [6 7;8 9]
A=
6 7
8 9
>> B = [1 2;3 4]
B=
1 2
3 4
>> C=A-B
C=
5 5
5 5
5. Find the value for polynomial g(x) = x6 – 5x5 + 2x3 + 3x2 - 2 for x = -2 using
MATLAB!
A. 212
B. -214
C. -216
D. 214
E. 216
Answer : E
Solution :
>> p=[1 -5 0 2 3 0 -4]
p=
Columns 1 through 6
1 -5 0 2 3 0
Column 7
-4
ans =
216
6. Given f(x) = 3x3 – 5x and g(x) = x4 + 3x2 – 2. Find the value of f(2).g(2)
using MATLAB!
A. 286
B. 244
C. 364
D. 386
E. 424
Answer : C
Solution :
>> f=[3 0 -5 0]
f=
3 0 -5 0
>> a=polyval(f,2)
a=
14
g=
1 0 3 0 -2
b=
26
>> a*b
ans =
364
Answer : A
Solution :
>> a=7^2*(144/11)
a=
641.4545
>> b=(8^2+12)/9^3
b=
0.1043
>> a+b
ans =
641.5588
8. Given f(x) = 2x4 - 3x2 + 5x + 8 and g(x) = 7x3 – 4x2 + 7x. Find the value of
f(-3):g(3) using MATLAB!
A. 0.7458
B. 0.7356
C. 0.8764
D. 0.8865
E. 0.8876
Answer : B
Solution :
>> f=[2 0 -3 5 8]
f=
2 0 -3 5 8
128
>> g=[7 -4 7 0]
g=
7 -4 7 0
b=
174
>> a/b
ans =
0.7356
Answer : A
Solution :
>> p=[0.8 0.4 2 1]
p=
Columns 1 through 3
1.0000
a=
13
>> cos(a)
ans =
0.9074
π
10. Calculate the value of θ = sin( 6𝑥 3 +2𝑥 2 − 7 ) if x = 3 using MATLAB !
A. 0.0294
B. 0.0282
C. 0.0182
D. 0.0194
E. 0.0178
Answer : C
Solution :
>> p=[6 2 0 -7]
p=
6 2 0 -7
a=
173
>> theta=sin(pi/a)
theta =
0.0182