how can i smooth this plot?

3 Ansichten (letzte 30 Tage)
Jose Sandoval
Jose Sandoval am 9 Okt. 2017
Kommentiert: Kh zaa am 16 Sep. 2018
Regards, I have this curve that I show in the screen capture, but its tendency is very scattered I would like to know if there is the possibility of approaching it to a graph of the linear type by means of a filter
thank you very much
attached the data

Akzeptierte Antwort

Star Strider
Star Strider am 9 Okt. 2017
You have broadband noise. There may be a signal at about 0.35 Hz.
The Fourier transform analysis:
D = xlsread('power.xls');
t = D(:,1);
p = D(:,2);
L = length(t);
Ts = mean(diff(t)); % Sampling Interval (sec)
Fs = 1/Ts; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
FT_p = fft(p - mean(p))/L; % Fourier Transform (Discrete)
Fv = linspace(0, 1, fix(length(t)/2)+1)*Fn; % Frequency Vector
Iv = 1:length(Fv); % Index Vector
figure(1)
plot(Fv, abs(FT_p(Iv))*2)
grid
I will leave it for you to sort this.
  1 Kommentar
Kh zaa
Kh zaa am 16 Sep. 2018
I use level-1 s-function in my simulink model. Measurements of 5 variables are collected in simulink and sent to s-function. In order to filter out some of measurements noise, i need to use the average of the snapshots received over a a time window (i.e. 2 second). how i can do that ? thanks

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by