Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

signal processing - Plotting of complex exponential function using Matlab

I am using matlab to plot complex exponential function.But i am not getting the required waveform as output. My Signal is exp ( j2πmf ) where m takes various positive values.

My code is shown below.


    close all;
    clc;
    f= -0.5:0.5;
    Rez = cos(2*pi*1*f);
    Imz = sin(2*pi*1*f)*j;
    z = Rez + Imz;
    z_n = exp(z);
    plot(f,z_n);
    xlabel('Frequency ->');
    ylabel('Amplitude->');
    grid on
    axis tight

My Output Signal Output

But I want the signal shown below as my output

Required Output

question from:https://stackoverflow.com/questions/65897587/plotting-of-complex-exponential-function-using-matlab

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

First of all, you try to make a plot of complex numbers z_n. This does not make any sense. You can plot the real part (real(z_n), the imaginary part (imag(z_n) or the absolute values (abs(z_n).

However, your exceptions in the second diagram are wrong too. Your function exp(j2πmf) is a rotating vector with absolute amplitude 1.

This results in:

  1. real(exp(j2πmf) = cos(2πmf)
  2. imag (exp(j2πmf) = sin(2πmf); By the way, imag does not include j, it is the value which has j as a factor.
  3. abs(exp(j2πmf) = 1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...