In my numerical analysis class we sometimes need to do calculations with t-digit rounding arithmetics, i.e. every calculation (every calculation, not every variable assignment) is rounded to t meaning-full digits. I'm using matlab for my calculations, and I need a way to limit matlab to do all of its calculations in t-digit rounding arithmetics.
If no such way exist, I would want to find a way to round specific number to t meaning-full digits.
Thanks!
p.s. I tried using digits(t)
but it seems to effect only the way matlab display the numbers (I may be using it wrong).