plotting complex exponential function
์กฐํ ์: 3 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
f=(0:10000);
d=(0.0075:0.03);
w=2*pi*f;
t=(0:0.2);
k=(81.6*pi);
rin=0.71;
%x=rin*exp(-1i*2*k*d);
y=0.71*exp(-1i*2*k*d);
d=abs(y);
plot(real(d),imag(y));
xlabel("thickness",'fontsize',10);
ylabel("rin",'FontSize', 10);
title("Input reflection coefficient as a function of the physical thickness ๐ โ 8โค ๐ โค ๐โ2 ","fontsize",6);
grid on;
here is my code but when i try to run it it work but i dont gate any sygnal on de graphe the graph are just empty
i dont understant it please some one can help me or explain at the place i dit a wrong code
๋๊ธ ์: 0
๋ต๋ณ (2๊ฐ)
Walter Roberson
2023๋
1์ 20์ผ
d=(0.0075:0.03);
w=2*pi*f;
t=(0:0.2);
The default increment for the : operator is 1, so you are programming
d=(0.0075:1:0.03);
w=2*pi*f;
t=(0:1:0.2);
but 0.0075+1 > 0.03 so d will only have a single entry, and 0+1 > 0.2 so t will only have a single entry.
Walter Roberson
2023๋
1์ 20์ผ
Removing the variables that you do not use, and setting a finer increment for d
d=(0.0075:0.001:0.03);
k=(81.6*pi);
y=0.71*exp(-1i*2*k*d);
plot(real(y),imag(y));
xlabel("thickness",'fontsize',10);
ylabel("rin",'FontSize', 10);
title("Input reflection coefficient as a function of the physical thickness ๐ โ 8โค ๐ โค ๐โ2 ","fontsize",6);
grid on;
You were taking real(abs(y)) as your independent coordinate, but real(abs(y)) is constant
syms D
Y=0.71*exp(-1i*2*k*D);
abs(Y)
but D is real so imag(D) is 0, so abs(Y) is the constant 71/100
๋๊ธ ์: 2
Walter Roberson
2023๋
1์ 20์ผ
t=(0:0.1);
That means you want to construct the list of numbers that starts with 0, and increases by 1 each time, and ends no later than 0.1 . That list describes only a single number.
Your f values are all integers and 2*pi*integer is a full sine or cosine cycle, so *exp(-1i*w*t) will have 0 imaginary part anywhere that t is an integer. But there is only 1 t value and it is an integer, so imag(y) is going to be 0 at that one location.
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
Help Center ๋ฐ File Exchange์์ Logical์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!