How to acquire the decimal values?

1 回表示 (過去 30 日間)
Casey
Casey 2012 年 4 月 18 日
I have a set of radians values, which are in a range of 300plus to -300plus, by assuming if I were to use this set of radian values to calculate my vehicle heading which is from -pi to pi, how do I calculate?
The following method I did which I am not sure I am correct, firstly I took the set of range values divide by pi, after dividing the values, the range of radian values are 135 to -136. The next step I wanted to do but I am stuck cause I am not sure is there a function of it in matlab. Is classify the range of values to even and odd, from there take the decimal values of each values * pi to acquire the heading radian value.
Please enlighten me, if my step is correct or is there a way to just take the whole number and acquire the decimal values(example:100.2315)? Thanks.
  1 件のコメント
Jan
Jan 2012 年 4 月 18 日
The question is unclear. What exactly is "300plus"? Radians values are define in the range -pi to pi only. Why do you calssify the values in even and odd? Please post a minimal example of inputs *and* outputs, whcih defines the operation exactly. E.g. if the input is 100.2315, what do you expect as output?

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2012 年 4 月 18 日
Perhaps you are looking for:
y = rem(x, pi)
?

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by