|
alfann <alfann.net@hotmail.com> wrote in message <2099019815.181559.1274200158332.JavaMail.root@gallium.mathforum.org>...
> Hi htere
> if I have a matrix as:
> A=[55555555555555 333333333333333 5225252552525252 121421212121212111 58088808808880 8808085416010654]
>
> it wil be shown in the matlab as:
> A =
>
> 1.0e+017 *
>
> 0.0006 0.0033 0.0523 1.2142 0.0006 0.0881
>
>
> my question is:
> how can I show each value in the matrix as a numbers without a power?
If you type fprintf(' %18.0f\n',A), you will get all six of the above integers printed out in full.
Note however that the fourth one is not reproduced exactly because it cannot be precisely represented by a double precision floating point number when it is entered. If you were to convert the fourth number as you have written it above to binary form, there would be a 57 bit span between the leftmost 1 bit and the rightmost 1 bit. Double precision numbers are capable of storing only 53 such bits, so matlab has to round it off to a 53-bit span to store it. This happens when the number is first entered with the A assignment statement, not at print time. What you see with fprintf above is what you actually have residing in A.
Roger Stafford
|