MATLAB Answers

Extracting the second decimal point of a number

1 view (last 30 days)
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.?

  0 Comments

Sign in to comment.

Accepted Answer

Roger Stafford
Roger Stafford on 3 Jun 2014
A=[8.18750];
d = mod(floor(100*A),10);

  0 Comments

Sign in to comment.

More Answers (0)