"Bruno Luong" <firstname.lastname@example.org> wrote in message <email@example.com>... > Sorry should read > > > > round(x*100)/100 > >
Consider the OPs original request: More specifically, I would like Matlab to consider 3.257 as 3.26. It is feasible for a single number, but I am looking for a command to use in the first line of the script and that applies same format to all the numbers along the calculations.
First, the above would apply "for a single number" but not for every number in the entire script.
Second, although 3.257 would APPEAR to be 3.26 (to two decimal digits), I don't believe it would necessarrily be EXACTLY 3.26 due to the way MATLAB (or a computer, in general) stores floating point numbers. (I don't have MATLAB installed on this computer, so I can't give an example using the short and long formats.)