How can i convert the first image(Red) like the second one(Black)?
조회 수: 2 (최근 30일)
이전 댓글 표시
댓글 수: 2
채택된 답변
Image Analyst
2021년 8월 1일
Use plot() instead of stem().
댓글 수: 5
Image Analyst
2021년 8월 2일
The black curve in your original post doesn't look smooth to me. But anyway, you can smooth the data and then plot the smoothed data with a sliding polynomial fit filter, sgolayfilt() in the Signal Processing Toolbox.
polynomialOrder = 2; % Larger for less smoothing.
windowWidth = 7; % Larger for more smoothing.
smoothedSignal = sgolayfilt(signal, polynomialOrder, windowWidth);
plot(smoothedSignal, 'b-', 'LineWidth', 3);
grid on;
title('Smoothed Signal', 'FontSize', 20);
If you don't have sgolayfilt(), try movmean().
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!