MATLAB Answers

Smooth data to get the best approximation.

조회 수: 4(최근 30일)
Alejandro Fernández
Alejandro Fernández 2020년 8월 12일
답변: Bruno Luong 2020년 8월 14일
Hello everyone, I was wondering if anyone knows how I could process the input data in such a way as to obtain something similar to what I show in smooth data. The points marked in red and blue correspond to the change points when using the ischange tool
cI = ischange(YY,'MaxNumChanges',1);
scatter(XX(cI),YY(cI),'filled')
I include an attached data with the points shown in the graph being XX and YY the input data (the ones I intend to modify) and the XSmooth, YSmooth data the ones I intend to get.
I've tried with the methods include in the smoothdata function but i couldn't get the result i expected
methods = {'movmean','movmedian','gaussian','lowess','loess','rlowess','rloess','sgolay'};

채택된 답변

hosein Javan
hosein Javan 2020년 8월 12일
I used curve fitting app you can workaround and change settings to get your result.
  댓글 수: 6
hosein Javan
hosein Javan 2020년 8월 14일

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

추가 답변(1개)

Bruno Luong
Bruno Luong 2020년 8월 14일
Here is what my ftting tool gives
load('InputData_SmoothData.mat')
pp=BSFK(XX,YY); % FEX file
plot(XX,YY);
plot(XX,ppval(pp,XX),'r');
legend('raw data','BSFK fitting')

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by