¿como puedo representar la parte real e imaginaria de fourier?
3 views (last 30 days)
Show older comments
syms s
gs=(s-1)/(s^2 - 1);
gjw=fourier(gs)
0 Comments
Answers (1)
Riya
on 20 Oct 2023
Hello Pablo Álvarez García,
I see that you want to represent the real and imaginary parts of Fourier.
Please note that to represent the real and imaginary parts of Fourier using MATLAB, you can follow these steps:
1. Define your signal or function in the time domain.
2. Use the `fft` function in MATLAB to compute the Fourier transform of the signal.
3. Take the real and imaginary parts of the Fourier transform using the `real` and `imag` functions, respectively.
Here is an example code snippet to illustrate this process:
% Define your signal or function in the time domain
t = linspace(0, 2*pi, 1000); % Time vector
x = sin(2*pi*5*t) + 1i*cos(2*pi*10*t); % Example signal with both real and imaginary components
% Compute the Fourier transform
X = fft(x);
% Take the real and imaginary parts of the Fourier transform
X_real = real(X);
X_imag = imag(X);
% Plot the real and imaginary parts
figure;
subplot(2,1,1);
plot(t, X_real);
xlabel('Time');
ylabel('Real part');
title('Real part of Fourier Transform');
subplot(2,1,2);
plot(t, X_imag);
xlabel('Time');
ylabel('Imaginary part');
title('Imaginary part of Fourier Transform');
In this example, we create a signal `x` with both real and imaginary components. Then, we compute the Fourier transform `X` using the `fft` function. Finally, we extract the real and imaginary parts of `X` using the `real` and `imag` functions, respectively, and plot them separately.
For reference you can refer following article related to fft:
I hope it helps!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!