フィルターのクリア

How do I get an array of deviations from 0 or 2 pi radians from an array of bearings ranging 0 to 2 pi?

1 回表示 (過去 30 日間)
I have a one dimensional array, basically a row from my 2d array of many rows, of bearing from 0 to 2 pi radians.
I want a new array that shows me how far off from 0 or 2 pi radians each element is.
So I tried
```
mod_arr = mod(arr_of_bearings, (2*pi))
```
but this is obviously wrong.
What would be a correct way to do it.
Most of bearings are near 0 or 2 pi radians so are like 0.0134, 6.2456, etc.

回答 (1 件)

KSSV
KSSV 2022 年 2 月 11 日
You can calculate the Euclidean distance. Read about pdist. You can calculate difference along x and y axes, read about diff, gradient.

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by