How to implement Complex Exponential Function Using Matlab ?
37 次查看(过去 30 天)
显示 更早的评论
Please
How can I implement the Complex Exponential Function mentioned in this equation:
X(N) =exp^(j*w1*N) + exp^(j*w2*N)
Suppose:
F =40KHZ
N=Range 1 to 20
w1: is the first angular frequency
w1=2*pi*F
w2: is the second angular frequency
w2=2*pi*F
Finally,
display the values are saved in X(N) in command window.
We apply fast fourier transform (FFT) on X(N) Then we plot the result.
0 个评论
采纳的回答
Star Strider
2023-11-3
I am not certain what you are doing or what ‘w1’ and ‘w2’ are, so using my best guess —
format longE
F = 40E+3;
N = (0:20).';
omega1 = 2*pi*F; % Guessing: 'W1'
omega2 = 4*pi*F; % Guessing: 'w2'
X = exp(1j*omega1*N) + exp(1j*omega2*N)
.
13 个评论
Star Strider
2023-11-4
That simply requires minor tweaks to the existing code.
See the documentation on the fft function to perform the Fourier transform. There are abundant examples throughout Answers. (I wrote many of them.)
That result may not be very exciting to view, since ‘X’ is created by returning integer multiples of
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1529307/image.png)
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!