smoothing a graph using matlab

2 Ansichten (letzte 30 Tage)
Abeer Aboul Azm
Abeer Aboul Azm am 28 Mai 2022
Beantwortet: Star Strider am 28 Mai 2022
how can I smooth data imported from one column (Excel sheet) using Matlab , Thanks
how to smooth the corners?

Akzeptierte Antwort

Star Strider
Star Strider am 28 Mai 2022
There are several opotions, including sgolayfilt and smoothdata and frequency-selective filters —
y = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1013745/Book1.xlsx');
L = numel(y);
x = linspace(0, L-1, L);
figure
plot(x, y)
grid
yf = smoothdata(y, 'sgolay', fix(L/25));
figure
plot(x, yf)
grid
Experiment with the window size (third argument in smoothdata) to get the result you want.
.

Weitere Antworten (1)

KSSV
KSSV am 28 Mai 2022
Read about smooth, polyfit

Kategorien

Mehr zu Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by