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:
Double precision accuracy in Matlab

Subject: Double precision accuracy in Matlab

From: Chukwuemeka Igwe

Date: 21 Sep, 2007 21:06:28

Message: 1 of 6

I am working with with latitudes longitudes in geodeitcs,
I am confronted with the fact that I might loose
accurracy wiht the number of decimal places involved. Are
there commands in matlab that gives me posibility of
improving double precision accuracy so that my
transformations are not off by more than cms?


Sincerely,

Chuk

Subject: Double precision accuracy in Matlab

From: dpb

Date: 21 Sep, 2007 21:14:19

Message: 2 of 6

Chukwuemeka Igwe wrote:
> I am working with with latitudes longitudes in geodeitcs,
> I am confronted with the fact that I might loose
> accurracy wiht the number of decimal places involved. Are
> there commands in matlab that gives me posibility of
> improving double precision accuracy so that my
> transformations are not off by more than cms?

Matlab is double precision (eight bytes) by default. That provides
roughly 15-16 decimal digits of precision. How much do you need?

--

Subject: Double precision accuracy in Matlab

From: Steven Lord

Date: 22 Sep, 2007 02:57:24

Message: 3 of 6


"Chukwuemeka Igwe" <chukigwe@yahoo.com> wrote in message
news:fd1bok$ce$1@fred.mathworks.com...
>I am working with with latitudes longitudes in geodeitcs,
> I am confronted with the fact that I might loose
> accurracy wiht the number of decimal places involved. Are
> there commands in matlab that gives me posibility of
> improving double precision accuracy so that my
> transformations are not off by more than cms?

Please don't both post and email me directly. If you post it to the
newsgroup, not only will I read it but so with others and they may respond
before I do.

Anyway, as dpb said, MATLAB computes by default in double precision. If you
want higher precision you'll need to use the sym object in Symbolic Math
Toolbox or something similar. Note that while you gain in precision by
computing using the arbitrary precision routines in Symbolic Math Toolbox,
it will take more time to perform computations with sym objects, and not all
functions will work with sym objects.

--
Steve Lord
slord@mathworks.com

Subject: Double precision accuracy in Matlab

From: Chukwuemeka Igwe

Date: 3 Oct, 2007 21:05:08

Message: 4 of 6

"Chukwuemeka Igwe" <chukigwe@yahoo.com> wrote in message
<fd1bok$ce$1@fred.mathworks.com>...
> I am working with with latitudes longitudes in
geodeitcs,
> I am confronted with the fact that I might loose
> accurracy wiht the number of decimal places involved.
Are
> there commands in matlab that gives me posibility of
> improving double precision accuracy so that my
> transformations are not off by more than cms?
>
>
> Sincerely,
>
> Chuk
My confussion is that when it outputs the result in MATLAB
space it does it in only 4 decimal places. Does it still
retain the complete variable accuracy? My suspicion is
that when we convert latitudes inot distances, it takes
seven or eight decimal places to approximate to a meter of
real estate and that the output might be causing me some
noticable error.
I am not sure how the accuracy is affected during various
tranformations.
Is there a comand to allow the MATLAB retain all its
decimal places during computation at least internally?

Sincerely,

Chuk

Subject: Double precision accuracy in Matlab

From: Kenny Israni

Date: 9 Jun, 2009 16:42:01

Message: 5 of 6

I am facing a similar kind of problem in getting more than 4 decimal precision for Matlab arrays. Is there a way to display all 16 digits of a double precision array?

Thanks,
-Kenny

Subject: Double precision accuracy in Matlab

From: Damian Sheehy

Date: 9 Jun, 2009 16:43:20

Message: 6 of 6

format long

"Kenny Israni" <kennyisrani@gmail.com> wrote in message
news:h0m3cp$843$1@fred.mathworks.com...
>I am facing a similar kind of problem in getting more than 4 decimal
>precision for Matlab arrays. Is there a way to display all 16 digits of a
>double precision array?
>
> Thanks,
> -Kenny

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