Extracting the second decimal point of a number

1 回表示 (過去 30 日間)
joseph Frank
joseph Frank 2014 年 6 月 3 日
回答済み: Roger Stafford 2014 年 6 月 3 日
Hi,
I want to extract the 2nd decimal point without rounding from a vector of numbers. For example:
A=[8.18750];
I want to get number 8. How can I do so in a simple way.?

採用された回答

Roger Stafford
Roger Stafford 2014 年 6 月 3 日
A=[8.18750];
d = mod(floor(100*A),10);

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by