Académique Documents
Professionnel Documents
Culture Documents
Due: 2/7/2012
I. Enter these commands interactively in sequence in MATLAB and record results. Be sure to understand what
operations are being done in each case.
Arithmetic Exercises
1. r=12.5; V=(4/3)*pi*r^3
V= ___________
3. y=[1:1:10]
y(7)= _________
4. D = [1 2 6; 0.5 -4 2; 1 1 -1]
x = det(D)
Volume of sphere
x= _________
5. D = [1 2 6; 0.5 -4 2; 1 1 -1];
Dinv = inv(D); D*Dinv
D(i,i)= ________
( 1 i 3 )
Identity Matrix
y(12) = _____
z=x.^2
z =[ ____
z = [ ___
10.
11.
x=[0,1,3,7,12,23,29]; y=fliplr(x);
12.
x=sum([1:3:21].^2)
13.
14.
A=[1
1; 2 -1]; B=[-1
____
z= [______]
____
___
Elements squared
y= [ __
__
__
__
__
__
__ ]
x= [ _______ ]
z=[ _____
_____
[ _____
_____
_____ ]
[ _____
_____
_____ ]
2; 2 1];
C=A*B
C= [_____
[_____
Plotting Exercises
15. Plot the sinusoid x=2*cos(2*pi*t+ 3*pi/8) using t=[0:0.05:4]. From the plot,
approximate the value of x(0.5) and x(2.75).
ANS: x(0.5) =__________
x(2.75)= _________
(b) Express x(t) and y(t) as complex number phasors X and Y respectively. Form the sum
Z=X+Y and determine the magnitude of resulting phasor Z and the phase angle of Z.
ANS:
|Z| = ____________
(c) Plot two sinusoids, x(t)=2cos(30t+30o) and y(t)=3cos(25t-50o), and their sum
z(t)=x(t)+y(t). What is the period (distance between maxima) of z(t)and how is it related
to the frequencies of x(t) and y(t)?
ANS: Period of z(t)= ___________ and frequency = 1/Period = _______________
ANS: Relationship: _________________________________________________________