Azimut angles comparison for wind (position differences in a vector)
古いコメントを表示
Hi
I want to compare 2 datasets of azimutal wind directions and I want to know how to get the real resisdual between the 2 values being compared.
For example:
If I have a 345° modelised data (data1) and a 15° observed data (data2), I can't do data1 - data2 because it gives me 330° and not 30° who should be the real residual value.
I think it might work by calculating the umber of positions difference between the 2 data in a vector (to limit the number values of residual to 360), but I don't know how to do it.
I hope I'm clear !
Any other idea would be welcome !!
Thanks a lot
回答 (1 件)
Roger Stafford
2015 年 1 月 12 日
Presumably you want a difference that lies between 0 and 180, as would be true for the inner angle of any triangle.
a = mod(data1-data2,360);
a = min(a,360-a);
カテゴリ
ヘルプ センター および File Exchange で PHY Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!