How do I fix this code to get a proper moving average plot?
古いコメントを表示
This is a homework question. I was given a set of wind speed data, and was asked to calculate moving averages as well as other information using MATLAB. Specifically, for the moving average, I am not allowed to use movmean, conv, filter, smooth or any other built in functions. So I made my own function, but its not giving the proper output. I know my plot using my function is wrong since it does not give me the same plot when I check with movmean.
This is the plot I get using movmean:

This is the plot I get using my own function:

I have attached both the data set and the .m file for the code. Any help would be very much appreciated. Thank you!
1 件のコメント
DINUMOL VARGHESE
2020 年 10 月 19 日
Can you attach your moving average file here?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

