Scaling the FFT and the IFFT
Mostra commenti meno recenti
What is the correct way to scale results when taking the Fast Fourier Transform (FFT) and/or the Inverse Fast Fourier Transform (IFFT)?
1 Commento
Jan
il 21 Gen 2019
@zhiyong zhang: Please post a comment to ask for a clarification. Flagging is used to mark a message because it conflicts with the terms of use, e.g. spam or rudeness.
Risposta accettata
Più risposte (8)
Dr. Seis
il 28 Gen 2012
You are right about scaling being unimportant if only the shape of the spectrum is desired. However, if it is necessary that the amplitudes in the frequency spectrum be correct, then there is only one option for scaling - your option #1. In order for Parseval's theorem to hold, the energy in the time domain must equal the energy in the frequency domain. The example below demonstrates this:
> N = 8;
> dt = 0.1;
> df = 1/(dt*N)
df =
1.25
> a = randn(N,1)
a =
0.70154
-2.0518
-0.35385
-0.82359
-1.5771
0.50797
0.28198
0.03348
> b = fft(a)*dt
b =
-0.32813
0.10746 + 0.30519i
-0.080365 + 0.075374i
0.34826 + 0.17802i
0.13866
0.34826 - 0.17802i
-0.080365 - 0.075374i
0.10746 - 0.30519i
> energy_a = sum(a.*conj(a) * dt) % Not necessary to use conj here
energy_a =
0.83314
> energy_b = sum(b.*conj(b) * df) % Necessary to use conj here
energy_b =
0.83314
11 Commenti
Dr. Seis
il 28 Gen 2012
Another test is to create a spike in the time domain with amplitude equal to Fs, then ensure that the magnitude at each frequency is unity after scaling.
Eugene
il 15 Feb 2012
If my scaling is 'dt', for 1-Dimension, is it should by dt^2 for 2-D, please ?
Dr. Seis
il 15 Feb 2012
In general, if you have a 2D "image" that is sampled every dx along the x-direction and dy along the y-direction, then you would do:
A = rand(64,64);
B = fft2(A)*dx*dy;
In your case, if the increments in the x- and y-direction are equal, then yes either dx^2 or dy^2 will be appropriate.
Jonathan Dandy
il 7 Set 2013
Modificato: Jonathan Dandy
il 7 Set 2013
This answer works out, but confuses what is actually going on.
The frequncy domain data (b) is first multiplied by dt (b=fft(a)*dt). It is then squared (b.*conj(b)) and finally multiplied by df. The net effect is dt^2*df. Since df is defined as 1/(dt*N), this reduces to dt/N.
The time-domain data (a) only has the multiplier dt. So, in the end, the ratio of coefficients on the frequency domain and time-domain energy is 1/N. This also agrees with the formulation of Parseval's theorem in the discrete domain. ( http://en.wikipedia.org/wiki/Parseval%27s_theorem )
The reason dt and df are not needed for Parseval's theorem in the discrete domain is because dt and df are associated with continuous integral.
I am still sorting out the scaling. It seems like option 4 from the original value satisfies Parseval's equation. However, option 2 seems to mainatin the relationship between amplitudes (looking at DC levels) and has been suggested in a Matlab technical note (1702). There is also some good discussion about 1702 in Matlab Central.
omar thamer
il 19 Dic 2013
answer worked in case the reconstruction has the same length with original signal. What if the reconstruction has more length in order to do some prediction, How would you scale the ifft ?
Rick Rosson
il 5 Nov 2015
Modificato: Rick Rosson
il 5 Nov 2015
Dr. Seis
il 12 Apr 2016
Johnathan, not sure what I am confusing here. I would suggest you look at the answer from "Chani" below in addition to my comment to their answer. Multiplying the output from Matlab's FFT function with "dt" is the only way to approximate the correct amplitudes (if you care about having physically meaningful amplitudes) AND allow for Parseval's theorem to be satisfied.
Just to follow Rick's comment and clarify my notation - when I say "dt" or "df" it is meant as a "delta-t" or "delta-f" (as in a discrete time or frequency increment), respectively.
Clay Fulcher
il 20 Set 2018
Modificato: Clay Fulcher
il 21 Set 2018
Dr. Seiss, I want to thank you for helping me finally arrive at the correct scale factor to use for Matlab's FFT. I've been using 1/N for decades, and it usually isn't a problem since I most often go back to the time domain with N. However dt is the correct scale factor for FFT due to Parseval's Theorem as you made very clear. I would like to add this regarding the scale factor on IFFT: If Matlab did not internally scale their IFFT function by 1/N, then the correct scale factor to apply to IFFT would be df. However, Matlab does scale their IFFT by 1/N. It allows the FFT/IFFT transform pair to give the same result when transforming to frequency and back to time domains.
Since df = (fs / N) = [1 / (dt * N)], the correct scale factor to use with Matlab's "scaled" IFFT is (1 / dt). In Matlab,
X(f) = fft ( x(t) ) * dt
x(t) = ifft ( X(f) ) / dt
Here is the proof. If IFFT is the unscaled IFFT, and IFFTm is Matlab's implementation of IFFT/N,
x(t) = IFFT [X(f)] * df (for Parseval's theorem to be satisfied)
= IFFTm [X(f] * (df * N)
= IFFTm [X(f)] * [(fs / N) * N]
= IFFTm [X(f)] * (1 / dt)
QED
Rik
il 4 Giu 2019
Comment posted as flag by yeon sook you:
can you help me??ㅜㅜ
@yeon sook you Have a read here and here. It will greatly improve your chances of getting an answer.
Thank you for this clear answer Dr.Seis, it should be moved to the top since it has the most upvotes, above the unhelpful, flippant accepted answer.
Rick's response does not address a main reason for this question: the common situation where different component signals are processed separately and added together at the end in the frequency domain, hence the need to ensure that they are of the same scale.
Raunaq Nayar
il 20 Feb 2020
What about the case where I perform scaling by factor(x) in time domain perform FFT followed by IFFT and then scale back by factor (1/x) to recover signal. Do I need to take care of the value of x then? I am asking this because in this case we will be scaling up and scaling down both in time domain, so I think for this specific case the Parseval's Theorum should hold true irrespective of the value of x.
In other words, I am following the following sequence of steps-
Scaling by x --> FFT --> IFFT -->Scaling by 1/x
I would also like to confirm the same for scaling by x in frequency domain followed by IFFT then followed by FFT and then scaling by 1/x in frequency domain itself.
In other words, I am following the following sequence of steps-
Scaling by x --> IFFT --> FFT -->Scaling by 1/x
Can x assume any value to recover the signal for the mentioned cases?
Jérome
il 1 Ago 2017
Hello
I have seen so many subjects related to this issue and so don't know on which to put my answer...I hope this can help some people. I can see there are mainly 3 groups of people, those saying that is not important, those dividing by the number of points of the signal, and those dividing by the sampling frequency. first, for some applications,yes the correct amplitude is important. for example, the magnitude of an earthquake is computed from the amplitude of the spectrum.
then I agree with Dr Seis, the correct way of scaling spectrum is multiplying by dt.
People saying fft has to be divided by the number of points often take the example of the sin wave with amplitude A and want to see 2 peaks with amplitude A/2 on the spectrum. however, this is not the Fourier transform of a continuous sin wave. The Fourier transform has two Diracs. The value of each peak is infinite and the integration over the frequency domain is A/2. So the value of a correctly-scaled discrete spectrum we should have on both peaks is
A/df/2 = Npoints*A/Fs/2
Fs being the sampling frequency, df the step of the frequency vector.
the matlab fft outputs 2 pics of amplitude A*Npoints/2 and so the correct way of scaling the spectrum is multiplying the fft by dt = 1/Fs. Dividing by Npoints highlights A but is not the correct factor to approximate the spectrum of the continuous signal.
The second point is the parseval equation. I have seen many people saying the fft can not respect this relation or is not applicable in discrete mode. first, in discrete mode, if should tends to the continuous value. if can not be Npoints lager or smaller. And, if the fft is multiplied by dt, the energy of the input signal equals the energy of the spectrum.
I have seen quite often people using the Parseval equation for discrete signal like this, which is incorrect
sum(abs(xi).^2) = sum(abs(Xi).^2) with X = fft(x)
The correct discrete form of the Parseval relation is:
sum(abs(xi).^2)*dt = sum(abs(Xi).^2)*df
the relation is satisfied if the fft is multiplied dt and df is correctly defined.
Moreover, there are many simple typical Fourier transforms such as exponential decay, triangle function.. you can model the temporal signals and the known continuous transforms and check that fft*dt is the correct way of approaching the continuous transform.
1 Commento
Alex Hanes
il 14 Mag 2020
Modificato: Alex Hanes
il 14 Mag 2020
In MATLAB, your statement is basically correct (e.g. the correct discrete form of Parseval's theorem is:
P_avg_TD = sum(abs(x).^2)*dt;
P_avg_FD = sum(abs(X).^2)*df;
provided that the Fourier transform result is appropriately scaled by a factor of dt (your samling period). You can see this by:
where
and
so the above equation becomes:
Canceling terms on the left and right, you get the "incorrect" expression you wrote above:
where
is just defined as the fft result (
). For reference, Numerical Recipes uses the "incorrect" definition as the discrete form of Parseval's theorem, so maybe there is confusion for varying definitions and conventions.
Here's an example code that shows the correct Fourier transform scaling with comparison to the analytical result for the Fourier transform of a Gaussian. The analytic solution to the integral:
clear; clc;
%% Analytic Function: Gaussian
sigma = 1; % "width" of Gaussian
% Define the time-domain function, |f(t)|^2:
fun_t = @(t) exp(-t.^2/(2*sigma^2)).*conj(exp(-t.^2/(2*sigma^2)));
% Define the analytic Fourier transform of f(t), e.g. |f(w)|^2
fun_w = @(w) (sigma*sqrt(2*pi)).*exp(-(sigma*w).^2/2).*conj(...
(sigma*sqrt(2*pi)).*exp(-(sigma*w).^2/2));
int_t = integral(fun_t,-inf,inf); % P_avg of f(t)
int_w = integral(fun_w,-inf,inf)/(2*pi); % P_avg of f(w)/2pi
%% Numerical Example: Gaussian
% Define time domain for numerical signal
N = 1e7 ; % no. points in domain
domain = [-5000 5000]; % domain to evaluate f(t)
L = domain(1,2) - domain(1,1); % length of domain (e.g. [-5e3,+5e3])
dt = L/N; % step size, dt
t = min(domain):dt:max(domain)-dt; % t_n = t_min + n*dt (n = 0, ..., N-1)
% Define the function in the time-domain
sigma = 1; % "width" of Gaussian
ft_num = exp(-t.^2/(2*sigma^2)); % f(t), numerical
fw_num = fft(ft_num); % f(w), numerical (unscaled)
% Consider Parseval's Theorem (Numerical Recipes, no dt or df factors)
E1_timedomain = sum(abs(ft_num.^2))
E1_freqdomain = sum(abs(fw_num.^2))/N
% Consider Parseval's Theorem (based on "Riemann" integration)
df = 1/(N*dt); % calculate frequency step
fx = fw_num.*dt; % scale fw_num according to dt (redefine as fx)
E2_timedomain = dt*sum(abs(ft_num.^2))
E2_freqdomain = df*sum(abs(fx.^2)) % factor of 2*pi is dropped by
% differences in FT definitions*
I should also point out that the "incorrect" method satisfies Parseval's theorem (e.g. P_avg_TD = P_avg_FD in the first line of code), however, you get the incorrect average power content, as shown by the example code for E1_timedomain versus E2_timedomain.
Hi everyone,
I tried both options mentioned above, namely option #1 and option #2 with a simple sine curve. The results of both options confuse me and I am hoping you can help clear things up.
The code I am referring to is the following:
dt = 0.05; %Time step
t = [0:dt:10]; %Time vector
s = sin(2*pi*t); %Signal vector
N = length(s); %Number of data points
f_s = 1/dt; %Sampling frequency
df = f_s/N; %Frequency increment
NFFT = N; %FFT length used as second argument of fft()
y_option1 = fft(s,NFFT); %Compute FFT using sampling interval as scaling factor
y_option1 = y_option1*dt;
y_shiftOption1 = fftshift(y_option1);
y_option2 = fft(s); %Compute FFT using signal length as scaling factor
y_option2 = y_option2/N;
y_shiftOption2 = fftshift(y_option2);
if mod(N,2) == 0 %N is even
f = -f_s/2 : df : f_s/2-df;
else %N is odd
f = [sort(-1*(df:df:f_s/2)) (0:df:f_s/2)];
end
Plotting the sine signal and both result vectors y_shiftOption1 and y_shiftOption2 leads to the following Figure:

From my point of view the result of option #2 exhibits the correct amplitude of 0.5V, since the time signal has an amplitude of 1V and this value is split into the two impulses on the negative and the positive frequency scale.
However, regarding Parseval's Theorem, the energy is only preserved using option #1:
sum(abs(s).^2)*dt = 5
sum(abs(y_shiftOption1).^2).*df = 5
sum(abs(y_shiftOption2).^2).*df = 0.0495
Does this mean, if I am interested in the real amplitude of the signal, I have to use option #2 and if I want to preserve the energy of the signal option #1 has to applied?
Thanks in advance for your help!
Best Regards Chani
8 Commenti
Rick Rosson
il 16 Set 2015
Modificato: Rick Rosson
il 16 Set 2015
Chani
il 17 Set 2015
Thanks for your explanation!
Image Analyst
il 10 Nov 2015
Shaui's flag on Rick's comment moved here to be a comment:
Fantastic!
Dr. Seis
il 10 Apr 2016
Rick, for Option #2, the graph represents spectral density in units of "volts per sample" (not simply "volts"). Until you supply the correct value used to sample the data as a "scale factor", the amplitudes are physically meaningless.
Also, if you do the actual Fourier Transform of that example SINE wave (with limits from 0 to 10) you will find that the amplitude at f=1Hz SHOULD be 5. So really, option 1 satisfies the amplitude issue and Parseval's theorem.
The point I have been trying to make in this post (and several others around "Matlab Answers") is if you are trying to approximate the Fourier Transform for a periodically sampled time series that is finite in length, then there is only one way to scale the output from the FFT function in Matlab - multiply the result by dt.
Doc Seis.....have you got an example to show this? I'm thinking of a portion of a sinusoidal signal that digitally spans 1 period..... such as N points, where point #0 is the start point, and the point #(N-1) is the LAST point (such that the following data point would theoretically be the same as point #0 again). The data set will be 'N' points.
For this case, the scaling should still be 'divide by N', right? If instead we multiplied the result by the sampling period, then the FFT magnitude amplitudes wouldn't look right..... right?
Matthias Jochem
il 14 Mag 2021
@Kenny Hi, can you explain what makes you think that this particular case differs from the principle described above ? Because i'm actually thinking about exactly this case (so analyze amplitudes and phases with FFT of exactly one period (centered in the input array) of signal). Greetings
Kenny
il 14 Mag 2021
Hi there Matthias. I think I found my answer for the scaling ----- which at that time I didn't understand what it was for. But it looks like that if scaling is done for either or BOTH the FFT and the IFFT, then the scaling factors applied to both FFT and IFFT need to have their product become equal to 1/N. So if no scaling is applied to the IFFT, while the FFT has a 1/N, scaling factor ..... then that's ok. And if the IFFT and the FFT are both scaled with the same factor of 1/sqrt(N), then that's ok too. There is some discussion about it at this link here ..... https://www.dsprelated.com/thread/4705/fft-ifft-scaling-revisited Thanks Matthias.
Rahul Kale
il 25 Gen 2023
Hello,
If I need to compare two signals with different sampling rate, total duration and number of samples, what should be the absolute criterion for comparison? whether amplitude(option#2 above) or energy(option#1 above) is to be used? Practicing engineers often think in terms of amplitude but is that correct mathematically?
Thanks
RSK
Bruno Luong
il 21 Set 2018
Modificato: Bruno Luong
il 21 Set 2018
1 voto
IMHO, if the input signal is x(t) is real, only about half of X(f) = fft(x)(f) is relevant (index 1:ceil((N+1)/2))) the other half is just conjugate of the flip of the first part, so the Parseval would be matching the integration of X(f)^2 on [0,1/(2*dt)] (up to Nyquist frequency) and one must multiply by an extra factor of abot sqrt(2) on top of dt on fft(x(t_i)) to get the Parseval equality up to Nyquist frequency (and not beyond that).
Some subtle consideration: if N is even, the frequency ceil((N-1)/2)*df count only once so it should not be multiplied by sqrt(2). The same for static term (f=0) for all the cases.
A factor of sqrt(2): it can make a bridge resists or fallen down.
Michele Marconi
il 24 Ott 2017
0 voti
How is it possible that the fft computed with matlab (no particular scaling!) and the FFT obtained by utilizing Xilinx module for SystemGenerator, have a 2000x factor scaling difference? i.e. Xilinx one is 2000 times lower amplitude?
(I thought this topic was spot-on regarding amplitude issues, sorry for gravedigging!)
1 Commento
Hossam Fadeel
il 23 Mag 2019
I have a situation where the values of the spectrum from the MATLAB FFT is double the values of the Xilinx FPGA FFT for the same input data.
I used below MATLAB Code,
clc;
clear all;
close all;
NFFT=2048; %NFFT-point DFT
fileID = fopen('Sine2048_test.txt','r');
A_Data = fscanf(fileID, '%d');% 2048 Sample points
%% Generate Sine with different freucies frpom the samples
mem_len = length(A_Data)
Sine0=[];% Base Frequency
Sine1=[];% Required Frequency
index=1;
N=32;% represend the frequency multiplier
for i=1:mem_len
Sine0 = [Sine0 A_Data(i)]; % get sin value, in range 0.0-1.0
if (index >= mem_len) %|| (index > mem_len)
index =1;
else
Sine1 = [Sine1 A_Data(index)];
index = index +N;
end
end
figure;
subplot(2,2,1);
plot(Sine0)
title('Original Sine Wave 1 Hz')
subplot(2,2,2);
plot(Sine1)
title('Sine Wave with Higher Frequency (5 Hz)')
%%
X_Sine0=fftshift(fft(Sine0,NFFT)); %compute DFT using FFT
fVals=(-NFFT/2:NFFT/2-1)/NFFT; %DFT Sample points
subplot(2,2,3);
% plot(fVals,abs(X_Sine0));
plot(fVals,abs(X_Sine0));
title('Double Sided FFT - with FFTShift');
xlabel('Normalized Frequency')
ylabel('DFT Values');
X_Sine1=fftshift(fft(Sine1,NFFT)); %compute DFT using FFT
fVals=(-NFFT/2:NFFT/2-1)/NFFT; %DFT Sample points
subplot(2,2,4);
plot(fVals,abs(X_Sine1));
title('Double Sided FFT - with FFTShift');
xlabel('Normalized Frequency')
ylabel('DFT Values');
%%
figure;
subplot(2,1,1);
plot(Sine1)
title('Sine Wave with Higher Frequency (5 Hz)')
X_Sine1=fftshift(fft(Sine1,NFFT)); %compute DFT using FFT
fVals=(-NFFT/2:NFFT/2-1)/NFFT; %DFT Sample points
subplot(2,1,2);
plot(fVals,abs(X_Sine1));
title('Double Sided FFT - with FFTShift');
xlabel('Normalized Frequency')
ylabel('DFT Values');
%%
X_Sine1=fft(Sine1,NFFT)/NFFT; %compute DFT using FFT --(/NFFT) scale factor for FFT
%fVals=(-NFFT/2:NFFT/2-1)/(NFFT); %DFT Sample points
FFT_imag = imag(X_Sine1)';
FFT_real = real(X_Sine1)';
figure;
plot(abs(FFT_imag));
figure;
plot(abs(FFT_real));
figure;
plot(abs(X_Sine1));
title('Double Sided FFT - with FFTShift');
xlabel('Normalized Frequency')
ylabel('DFT Values');
===========
The output of MATLAB - Last figure
The amplitude is 8000

The output of the Xilinx FPGA is:
The amplitude is 4000

Any explaination for this will be appreciated.
RSK
il 19 Apr 2018
0 voti
Dr. Seis,
I think here and at other places where you have mentioned the word "amplitude", you meant the amplitude of the resulting transform after multiplying by dt, correct? (and that is not going to be the amplitude of the sine wave at that frequency and having that transform). However, if people are interested in the amplitude of sine wave that generated the transform, should option#2 in Chani's example be used(although that is not the real amplitude of the transform)? If I have something, say, machine bed(for the sake of example) vibrating at 1hz with unit magnitude and I am presented with the transform generated by "option#1" as the measured vibration, I should certainly not conclude that the machine bed is vibrating with the amplitude shown by "option#1". So I guess dividing by N (option#2) would tell me the magnitude with which the machine bed is vibrating. Is this understanding correct? Thanks
Frantz Bouchereau
il 29 Lug 2021
0 voti
Here is a popular MATLAB doc page that explains FFT scaling and the relationship between FFT and true power spectra: Power Spectral Density Estimates Using FFT.
1 Commento
I found this link you mentioned on my first time through and I have read carefully but I don't agree with it. It also uses a functions that are not generally available (pow2db). I have been using FFT for quite some time for the purpose of detecting relative energy of frequency content but I have never bothered to dive into scaling it until now because I need to measure how specific distortion of my waveform impacts neighboring bands above and below the fundamental frequency. I started in with reading many threads like this and the Matlab helps then decided to prove that I was achieving the expected result with this approch. That didn't work so I tried all the approaches discussed in my code below which was also not satisfactory.
Here is my process. 1) Define time domain sample size and generate a waveform that repesents a measurable voltage visible into a 50ohm load. 2) Take the FFT of said waveform. 3) Scale the FFT 4) Integrate the scaled FFT to produce total power equal to the power of the input waveform.
I specifically selected a sine wave of magnitude 10V so that in a 50ohm system it represents 1W. P = (Vpk/sqrt(2))^2 / 50 = 1W. Thus I expect the integral of my correctly scaled FFT to equal 1.0W or peaks of roughly half that at +/-10Hz.
One important difference in my example is that I am not letting the length of the signal vector define the FFT size. I have set them equal in a previous test and that did not work either though. The following example produces the following five integration values for the associated scaling.
1) (1/N) * abs(FFT.^2)/50 ==> 100.14
2 (1/N) * abs(FFT) ==> 3.35
3) (1/sqrt(N)) * abs(FFT) ==> 335.1
4) (1/(N*fs)) * abs(FFT) ==> 0.034
5) (1/fs) * abs(xF) ==> 33.51
%% Timebaseand waveform setup
Ts = 1e-3; % Sampling Period
fs = 1/Ts; % Sampling Frequency
t = 0:Ts:1; % Time Vector
xT = 10*sin(2*pi*10*t+1); % Waveform (consider it Voltageon a 50ohm load)
%% FFT of Timebase
xF = fftshift(fft(xT,1e4)); % FFT of Voltage waveform
N = length(xF); % Length of FFT
f = linspace(-fs/2,fs/2,N); % frequency vector for x axis of specrtal plot
fsi = fs/N; % Frequency Spacing increment
%% Rescaling of FFT to represent real power
xF1 = (1/(N)) * abs(xF.^2)*1/50; % FFT scaling attempt 1 Power conversion assuming units of V. Also
xF2 = (1/N) * abs(xF); % FFT scaling attempt 2 Scaled by FFt length
xF3 = (1/(sqrt(N))) * abs(xF); % FFT scaling attempt 3 Scaled by sqrt of fft length (Pareseval's theorum)
xF4 = (1/(N*fs)) * abs(xF); % FFT scaling attempt 4 Scaled by sampling frequency*fft length
xF5 = (1/fs) * abs(xF); % FFT scaling attempt 5 Scaled by time sampling frequency
%% Verification of scaling options
IxT = xT./50; % xT is a voltage waveform measured into a 50ohm load. IxT represents the current waveform.
iPxT = IxT.*xT; % iPxT is the instantaneous power waveform iPower = V * I
aPxT = mean(iPxT) % Numerical calculation for averave of instantaneous power
Power_xT = (max(xT)/sqrt(2))^2/50 % Numerical calculation of RMS Power = Vrms^2 / R
AUC1 = fsi*trapz(xF1) % Area under the curve (integration) of xF1. Should equal aPxT & Power_xT
AUC2 = fsi*trapz(xF2) % Area under the curve (integration) of xF2. Should equal aPxT & Power_xT
AUC3 = fsi*trapz(xF3) % Area under the curve (integration) of xF3. Should equal aPxT & Power_xT
AUC4 = fsi*trapz(xF4) % Area under the curve (integration) of xF4. Should equal aPxT & Power_xT
AUC5 = fsi*trapz(xF5) % Area under the curve (integration) of xF5. Should equal aPxT & Power_xT
%% Figures
figure(1)
subplot(311),plot(t,xT,t,IxT),legend('Voltage Waveform','Current Waveform'),grid
subplot(312),plot(t,iPxT,'m'),legend(['Instantaneous Power Waveform']),grid
subplot(3,5,11),plot(f,xF1,'g'),axis([-20, 20,0,max(xF1)*1.05]),title('1/(N) * fft^2/50'),grid
subplot(3,5,12),plot(f,xF2,'g'),axis([-20, 20,0,max(xF2)*1.05]),title('1/(N) * fft'),grid
subplot(3,5,13),plot(f,xF3,'g'),axis([-20, 20,0,max(xF3)*1.05]),title('1/(sqrt(N)) * fft'),grid
subplot(3,5,14),plot(f,xF4,'g'),axis([-20, 20,0,max(xF4)*1.05]),title('1/(Fs*N) * fft'),grid
subplot(3,5,15),plot(f,xF4,'g'),axis([-20, 20,0,max(xF4)*1.05]),title('1/(fs) * fft'),grid

Abu Taher
il 13 Ago 2021
0 voti
Perform IFFT of the multiplied result of two FFT sequences obtained from x and
Categorie
Scopri di più su Spectral Measurements in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!