Matlab exam, Exercises of Matlab skills

Matlab Exercises

Typology: Exercises

2015/2016

Uploaded on 11/07/2016

uriel_bello
uriel_bello 🇺🇸

1 document

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Z = sqrt(3)*exp(i*pi/4)
Z =
1.2247 + 1.2247i
>> Ztwo = 2*exp(i*pi/6)
Ztwo =
1.7321 + 1.0000i
>> Zthree = sqrt(3)*exp(i*3*pi/4)
Zthree =
-1.2247 + 1.2247i
>> Zfour = 2*exp(i*pi)
Zfour =
-2.0000 + 0.0000i
>> Zfive = 2*exp(-i*pi)
Zfive =
-2.0000 - 0.0000i
>> abs(Z)
ans =
1.7321
>> abs(Ztwo)
ans =
2
>> abs(Zthree)
ans =
1.7321
>> abs(Zfour)
ans =
2
>> abs(Zfive)
ans =
2
pf3
pf4
pf5

Partial preview of the text

Download Matlab exam and more Exercises Matlab skills in PDF only on Docsity!

Z = sqrt(3)exp(ipi/4)

Z = 1.2247 + 1.2247i

Ztwo = 2exp(ipi/6) Ztwo = 1.7321 + 1.0000i Zthree = sqrt(3)exp(i3pi/4) Zthree = -1.2247 + 1.2247i Zfour = 2exp(ipi) Zfour = -2.0000 + 0.0000i Zfive = 2exp(-i*pi) Zfive = -2.0000 - 0.0000i abs(Z) ans =

abs(Ztwo) ans = 2 abs(Zthree) ans =

abs(Zfour) ans = 2 abs(Zfive) ans = 2

>> Z

Z =

2.0000 + 0.2000i

plot(Z) plot(Z^2,'ro') Z2 = Z^ Z2 = 3.9600 + 0.8000i plot(Z2,'ro') Z3 = Z^ Z3 = 7.7600 + 2.3920i Zhalf = Z^(1/2) Zhalf = 1.4160 + 0.0706i

lows = [57 58 57 61 60 52 50 57 50 53 54 52 58 63 55 48 53 53 52 50 50 57 51 50 56 46 54 54 57 54 55]

lows =

Columns 1 through 22

57 58 57 61 60 52 50 57 50 53 54 52 58 63 55 48 53 53 52 50 50 57

Columns 23 through 31

plot(x,highs) Error using plot Vectors must be the same length.

x = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31]

x =

Columns 1 through 22

Columns 23 through 31

plot(x, highs) hold on

plot(x, lows)