How can I use smoothing like in excell?
Show older comments
Hi,
I have four curves in a graph and would like to smooth the curves like in excel (by clicking smooth). When I used the smoothing function in matlab it does not give me the same or similar curves to the one in excel.
freq = [24.37 27.22 29.04 30.77 32.50 35.59 38.17 39.47 41.10 42.98 52.08 57.58 63.56 66.52 70.09 78.95]
material_A= [ 35.8 39.40 45.96 33.14 25.83 56.07 7.98 15.50 11.78 9.26 12.08 50.28 22.27 18.36 17.53 24.32]
I have used the following smoothing functions but no success.
figure(1)
Z = smooth(material_A,'lowess');%(linear fit)
Z = smooth(material_A,'rlowess');%(linear fit)
Z = smooth(material_A,'sgolay');%(default) very bad
Z = smooth(material_A);
Z = smooth(material_A,'moving');%(default)%very bad
Z = smooth(material_A, 'loess'); %(quadratic fit)%very bad
Z = smooth(material_A, 'rloess'); %(quadratic fit)%very bad
d = plot(material_A,Z,'g-o','LineWidth',2);
in the attached you see the data (for four materials with smoothing using normal excell graph vs the original data).
Accepted Answer
More Answers (0)
Categories
Find more on Data Preprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
