help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable Scientific Notation when using num2str function


From: Sergei Steshenko
Subject: Re: Disable Scientific Notation when using num2str function
Date: Thu, 25 Oct 2012 04:47:45 -0700 (PDT)





----- Original Message -----
> From: bobkarh <address@hidden>
> To: address@hidden
> Cc: 
> Sent: Wednesday, October 24, 2012 1:11 PM
> Subject: Disable Scientific Notation when using num2str function
> 
> I am trying to convert a big number like : 
> 
> 12345678901234567890
> 
> into a string by using:
> 
> num2str(12345678901234567890)
> 
> but the result is:
> 
> ans = "1.2346e+019"
> 
> That answer "ans" is a STRING with size :
> size [1 , 11] 
> (one row, eleven columns)...and for example: value at column number two is
> "."
> 
> SO I'VE LOST MY NUMBER!!!
> AND I DON'T WANT THIS!!!!!
> 
> I want the original number to be a string 
> ans= "12345678901234567890"
> 
> I have tried to change format, using the function "format"
> but it doesn't work... I have also tried to change the built in variable:
> "fixed_point_format ()"
> but that doesn't work either....
> 
> IS THERE A WAY TO CONVERT A LARGE NUMBER TO A LARGE STRING?????
> 
> 
> 
> 
> 

Consider using 'symbolic' package - AFAIR it supports arbitrary precision 
numbers.

Regards,
  Sergei



reply via email to

[Prev in Thread] Current Thread [Next in Thread]