Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
to increase number of digits after decimal place in MATLAB

Subject: to increase number of digits after decimal place in MATLAB

From: gouri halde

Date: 9 Dec, 2012 18:44:11

Message: 1 of 4

How you can increase precision of answer (a number) in MATLAB? Actually I have to generate a chaotic time series using certain chaotic map. I got the series values but all of them are the same. I think if I could increase the number of digits after the decimal point I may get the minute variation in the series values.I am getting a precision of 4. For a perfect chaotic series I should have (may be)at least equal to 8. I am having a 64 bit operating system.
   

Subject: to increase number of digits after decimal place in MATLAB

From: dpb

Date: 9 Dec, 2012 18:58:04

Message: 2 of 4

On 12/9/2012 12:44 PM, gouri halde wrote:
> How you can increase precision of answer (a number) in MATLAB? Actually
> I have to generate a chaotic time series using certain chaotic map. I
> got the series values but all of them are the same. I think if I could
> increase the number of digits after the decimal point I may get the
> minute variation in the series values.I am getting a precision of 4. For
> a perfect chaotic series I should have (may be)at least equal to 8. I am
> having a 64 bit operating system.

At the command line

format long % doc format

NB internal precision is double by default so there are roughly 15 bits
of precision it's only the display that is shortened for (usually)
convenience.

If you need the results in text other than at command window,

doc fprintf % and friends

and use format string as desired...

--

Subject: to increase number of digits after decimal place in MATLAB

From: John D'Errico

Date: 9 Dec, 2012 22:24:12

Message: 3 of 4

dpb <none@non.net> wrote in message <ka2mvr$gdm$1@speranza.aioe.org>...
> On 12/9/2012 12:44 PM, gouri halde wrote:
> > How you can increase precision of answer (a number) in MATLAB? Actually
> > I have to generate a chaotic time series using certain chaotic map. I
> > got the series values but all of them are the same. I think if I could
> > increase the number of digits after the decimal point I may get the
> > minute variation in the series values.I am getting a precision of 4. For
> > a perfect chaotic series I should have (may be)at least equal to 8. I am
> > having a 64 bit operating system.
>
> At the command line
>
> format long % doc format
>
> NB internal precision is double by default so there are roughly 15 bits
> of precision it's only the display that is shortened for (usually)
> convenience.

While I imagine you know this, the precision in MATLAB
is not 15 bits, but a bit over 15 digits.

John

Subject: to increase number of digits after decimal place in MATLAB

From: dpb

Date: 10 Dec, 2012 00:02:18

Message: 4 of 4

On 12/9/2012 4:24 PM, John D'Errico wrote:
...

> While I imagine you know this, the precision in MATLAB
> is not 15 bits, but a bit over 15 digits.

Typo/keyboard mistake indeed...

--

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us