Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How to get a string from a fixed point data
Replies: 2   Last Post: Feb 19, 2014 12:37 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
fl

Posts: 90
Registered: 10/8/05
Re: How to get a string from a fixed point data
Posted: Feb 18, 2014 11:18 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Tuesday, February 18, 2014 11:02:04 PM UTC-5, 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: Fixed-point: 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,



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.