Plotting a Complex exponential - G(e^jw)

96 ビュー (過去 30 日間)
Bill
Bill 2015 年 1 月 11 日
回答済み: abcd 2023 年 10 月 26 日
When plotting a function which is G(e^jw) what function would I use? As I know that for G(jw) I can use define a transfer equation etc.

回答 (4 件)

Rick Rosson
Rick Rosson 2015 年 1 月 12 日
編集済み: Rick Rosson 2015 年 1 月 12 日
N = 1024;
dw = 2*pi/N;
w = -pi:dw:pi-dw;
s = exp(j*w);
G = (s-a)./((s-b).*(s-c));
figure;
plot(w,abs(G));
figure;
plot(w,20*log10(abs(G)));
  1 件のコメント
Oleg Zhuravlev
Oleg Zhuravlev 2023 年 8 月 31 日
What are the variables a, b, c? Are they defined in a separate script?

サインインしてコメントする。


John D'Errico
John D'Errico 2015 年 1 月 11 日
編集済み: John D'Errico 2015 年 1 月 11 日
Um, what do you want to plot?
I assume that G returns a complex result, for complex input. As I hope you understand, a complex number is really a two dimensional animal. It has a real and an imaginary part. So typically when one plots complex numbers, you use the x and y axes, x for the real part, y for the imaginary part.
However, since the output is also complex in general, you will need to make a choice. Do you plot the real or imaginary part on the z axis? Or the magnitude of G, or the polar angle. Nothing stops you from making more than one plot of course.
In terms of what tool would you use, surf or contour will suffice for the task, or any of their cousins. Any tool that lets you plot in 3 dimensions.

Aditya Dua
Aditya Dua 2015 年 1 月 11 日
You can either plot abs() and angle() of G(e^jw) vs. w on the same axes, or just plot G(e^jw) in the x-y plane using something like plot(real(G),imag(G),'.'). Depends on what you are trying to accomplish.

abcd
abcd 2023 年 10 月 26 日
clc
clear all
close all
syms t s w
x=exp(jwt).*heaviside(t)
X=laplace(x)

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by