how can i smooth this plot?

조회 수: 6 (최근 30일)
Jose Sandoval
Jose Sandoval 2017년 10월 9일
댓글: Kh zaa 2018년 9월 16일
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

채택된 답변

Star Strider
Star Strider 2017년 10월 9일
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
Kh zaa
Kh zaa 2018년 9월 16일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by