![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/344952/image.png)
Smooth data to get the best approximation.
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Alejandro Fernández
il 12 Ago 2020
Risposto: Bruno Luong
il 14 Ago 2020
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/344931/image.png)
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'};
0 Commenti
Risposta accettata
hosein Javan
il 12 Ago 2020
I used curve fitting app you can workaround and change settings to get your result.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/344952/image.png)
6 Commenti
Più risposte (1)
Bruno Luong
il 14 Ago 2020
load('InputData_SmoothData.mat')
pp=BSFK(XX,YY); % FEX file
plot(XX,YY);
plot(XX,ppval(pp,XX),'r');
legend('raw data','BSFK fitting')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/346113/image.png)
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!