Extracting the second decimal point of a number

4 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by