Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


fl
Posts:
116
Registered:
10/8/05


Re: How to get a string from a fixed point data
Posted:
Feb 18, 2014 11:18 PM


On Tuesday, February 18, 2014 11:02:04 PM UTC5, fl wrote: > Hi, > > > > I have some fixed point arrays. I would like to write the string of these fi arrays to a text file. For example, the following element has: > > > > >> lut1_tmp0(1) > > > > ans = > > > > 3.276799902343750e+004 > > > > DataTypeMode: Fixedpoint: binary point scaling > > Signedness: Signed > > WordLength: 26 > > FractionLength: 10 > > > > I would like to write 32767.99902343750 to a text file. > > > > When I run: > > > > >> dec(lut1_tmp0(1)) > > > > ans = > > > > 33554431 > > > > dec is not similar to bin, hex? > > > > What can work for me? > > > > Thanks,
Hi,
I find the following command can get the value:
>> double(lut1_tmp0(1))
ans =
32.7679990234375e+003
but it has an exponential part (e+003). I have tried several format commands, but neither works. How to display 32767.990234375? Thanks,


Date

Subject

Author

2/18/14


fl

2/18/14


fl

2/19/14


dpb


