information about the number of times temperature changes from negative to positive
2 ビュー (過去 30 日間)
古いコメントを表示
Johannes Deelstra
2018 年 8 月 12 日
回答済み: Johannes Deelstra
2018 年 8 月 12 日
Hello
I have a time series with daily temperatures. The time series is starting with negative temperature. After some days the temperature is shifting from negative to positive and after some days back to negative. How can I get information about the number of times the temperature has changed from negative to positive.
0 件のコメント
採用された回答
KALYAN ACHARJYA
2018 年 8 月 12 日
編集済み: KALYAN ACHARJYA
2018 年 8 月 12 日
*Consider the temperatures as a vector a
count=0;
for i=1:length(a)-1
if a(i)<0 && a(i+1)>0
count=count+1;
end
end
disp(count);
0 件のコメント
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!