-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapa_s_z.m
61 lines (53 loc) · 1 KB
/
mapa_s_z.m
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
% O objetivo do script eh ilustrar o mapeamento z=exp(Ts)
%
% o codigo eh explicado no video: https://youtu.be/3iN1vNwIpJo
%
% LAA 11/6/21
clear
close
% definir parametros basicos
% tempo de amostragem
T=1;
% frequencia de amostragem
ws=2*pi/T;
% gerar valores aleatorios no semiplano esquerdo da faixa
% primaria ateh s>-2
% parte real
Rs=-rand(1000,1)*2;
% parte imaginaria
Is=(rand(1000,1)-0.5)*2*(ws/2);
% grafico
figure(1)
subplot(211)
plot(Rs,Is,'b.')
axis([-3 1 -ws ws])
xlabel('Re')
ylabel('Im')
% mapeamento para o plano z
j=sqrt(-1);
% modulo de z
Mz=exp(T*Rs);
% fase de z
Fz=T*Is*180/pi;
subplot(212)
polarplot(Fz,Mz,'r.')
%% gerar valores aleatorios no semiplano direito da faixa
% primaria ateh s<0,5
% parte real
Rs=rand(1000,1)*0.5;
% parte imaginaria
Is=(rand(1000,1)-0.5)*2*(ws/2);
% grafico
figure(2)
subplot(211)
plot(Rs,Is,'b.')
axis([-3 1 -ws ws])
xlabel('Re')
ylabel('Im')
% mapeamento para o plano z
% modulo de z
Mz=exp(T*Rs);
% fase de z
Fz=T*Is*180/pi;
subplot(212)
polarplot(Fz,Mz,'r.')