Splitting Wind direction into four quadrants
古いコメントを表示
Hello,
I had u & V component of wind. I converted them to wind speed & direction, using
wind_speed=sqrt((u^2)+(v^2));
wind_direction=180 + atand(u/v);
The problem is wind direction is not splitting into quadrants. As done here http://wx.gmu.edu/dev/clim301/lectures/wind/wind-uv.html
採用された回答
その他の回答 (1 件)
Kelly Kearney
2016 年 1 月 15 日
1 投票
As mentioned in those lecture notes, you'll need to use atan2 instead of atan (not atand either... your inputs aren't in degrees!) to get the four-quadrant result you want.
3 件のコメント
Student new
2016 年 1 月 15 日
Kelly Kearney
2016 年 1 月 15 日
Right, never mind on the degrees comment. I was mistakenly reversing inputs and outputs in my head. But as Chad answered, you still need the atan2d variant.
Student new
2016 年 1 月 15 日
カテゴリ
ヘルプ センター および File Exchange で Lengths and Angles についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!