Smoothing plots in MATLAB
이전 댓글 표시

Hello. I am trying to smooth my graph by applying the moving average filter. I have searched and discovered that there exists a function smooth(), which can easily make your curve smoother. Since I don't have this function, I have been trying to either code my own smoothing function, or download already written functions. However, none of them worked so far. Could anyone give me some advice on this? Thanks. My graph is the one given in the figure. (46 indexes, each index plotted with different colour.)
My code is as follows.
maxind = 46;
colortab = jet(maxind); %distinct colors
figure
hold on
for ind=1 : maxind,
plot(plane_des2(ind).Altitude, plane_des2(ind).IAS,'-', 'Color', colortab(ind,:));
if ind == 1 %save time on the rest
xlabel('Horizontal Displacement');
ylabel('Unfiltered Airpseed');
title('Airpseed vs Displacement');
end
end
hold off
Thanks.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!