フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How do I use the command 'smooth' to smooth a plot of data I have pulled from two matrices?

1 回表示 (過去 30 日間)
Noah Wilson
Noah Wilson 2018 年 5 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Here is the code I used:
if true
cloudy = find(Tday > 312.38 & Tday < 312.91);
T1smooth = smooth(Tmatrix(cloudy),'lowess');
figure(3),plot(Tday,T1smooth)
end

回答 (1 件)

OCDER
OCDER 2018 年 5 月 22 日
編集済み: OCDER 2018 年 5 月 22 日
Assuming Tmatrix is a 1xN or Mx1 matrix, your use of smooth is correct. But note that you are doing smoothing ONLY on cloudy days, and not all days. The other way to do this is smooth Tmatrix, and then take the cloudy days. You'll probably get different results, but which is the correct order depends on the application.
plot(Tday(cloudy), T1smooth)

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by