How to draw mean value as shown in picture
1 回表示 (過去 30 日間)
古いコメントを表示
Muhammadhn Muhammadh Khalid
2021 年 11 月 19 日
コメント済み: Muhammadhn Muhammadh Khalid
2021 年 11 月 21 日
Hi,
I want to plot the mean value as shown in red line in the attached picture.
Any help or idea is highly appreciated.
Thanks

0 件のコメント
採用された回答
Image Analyst
2021 年 11 月 19 日
Another option is sgolayfilt(). It's like movmean() but instead of fitting a line to the moving window you can fit a quadratic. That should help it follow the big peak better an not smooth it out so much. I'd use a frame (window) length that's large and an order of 2 or 3. Experiment around to get what you like.
plot(x, y, 'k-');
smoothY = sgolayfilt(y, 11, 2);
hold on;
plot(x, smoothY, 'r-', 'LineWidth', 3);
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Fit Postprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!