real number upto 2 decimal

HI All,

(Version : AX2009)

I want to get a real number upto 2 decimal points from a num.

for ex : A = 1023.1499 i want B = 1023.14

i have already tried with , round, decround, num2str , each of these functions give B=1023.15 (rounding 0.1499 to 0.15) but i want B= 1023.14.

Any idea how to do it.

Thanks,

kamapallli manish

Hi Manish,

You can use the following function to round down the decimals.

real a = roundDowndec(1023.1499 , 2);

Regards,

Raghav.

Hi Raghav,

Thanks for the response!!

I will check with it and hope it will give

real a = roundDowndec(1023.1499 , 2) = 1023.14 [:D]

Try roundUp(**1023.1499 , 0.01).

HI Raghav ,

Thanks a lot!!

it is working!!!