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:
Different results on windows and linux?

Subject: Different results on windows and linux?

From: Rui

Date: 16 Apr, 2013 13:24:17

Message: 1 of 5

I've been using Matlab (2012b 64-bit) on linux (Ubuntu 12.10) and windows (Windows 7), and I've noticed that running the same test script (which calls functions which are a part of a commercial toolbox) on each installation ends up outputting values that are slightly different.

From what I've gathered, this delta is at most 1e-5 in absolute terms.

Is this expectable? If it is, does anyone know what might be behind this?


Thanks in advance,
Rui Maciel

Subject: Different results on windows and linux?

From: Rui

Date: 17 Apr, 2013 08:36:07

Message: 2 of 5

On Tuesday, 16 April 2013 14:24:17 UTC+1, Rui wrote:
> I've been using Matlab (2012b 64-bit) on linux (Ubuntu 12.10) and windows (Windows 7), and I've noticed that running the same test script (which calls functions which are a part of a commercial toolbox) on each installation ends up outputting values that are slightly different.

Doe anyone experienced any discrepancy in results outputted by Matlab running on different OSs, or does Matlab generate the exact same results in any platform?


Rui Maciel

Subject: Different results on windows and linux?

From: Steven_Lord

Date: 17 Apr, 2013 13:40:16

Message: 3 of 5



"Rui" <rui.maciel@gmail.com> wrote in message
news:2b6ee8bc-9af9-4fa6-a55f-d6ef69b68123@googlegroups.com...
> On Tuesday, 16 April 2013 14:24:17 UTC+1, Rui wrote:
>> I've been using Matlab (2012b 64-bit) on linux (Ubuntu 12.10) and windows
>> (Windows 7), and I've noticed that running the same test script (which
>> calls functions which are a part of a commercial toolbox) on each
>> installation ends up outputting values that are slightly different.
>
> Doe anyone experienced any discrepancy in results outputted by Matlab
> running on different OSs, or does Matlab generate the exact same results
> in any platform?

Can you show the group a SMALL (10-20 lines) section of code with which you
can reproduce this behavior?

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Different results on windows and linux?

From: Rui

Date: 17 Apr, 2013 14:30:59

Message: 4 of 5

On Wednesday, April 17, 2013 2:40:16 PM UTC+1, Steven_Lord wrote:
> "Rui" wrote in message

> Can you show the group a SMALL (10-20 lines) section of code with which you
>
> can reproduce this behavior?


So far, I only noticed this with a couple of scripts I've used, but they are about 10 times that length and are a part of a proprietary toolbox.

I've also been trying to put together some ad hoc tests but so far I only managed to get the same results in both platforms.

Are there any standard stress tests (or standard-ish) that I can use for this purpose?


Thanks in advance,
Rui Maciel

Subject: Different results on windows and linux?

From: Loren Shure

Date: 19 Apr, 2013 09:34:02

Message: 5 of 5


"Rui" <rui.maciel@gmail.com> wrote in message
news:2b6ee8bc-9af9-4fa6-a55f-d6ef69b68123@googlegroups.com...
> On Tuesday, 16 April 2013 14:24:17 UTC+1, Rui wrote:
>> I've been using Matlab (2012b 64-bit) on linux (Ubuntu 12.10) and windows
>> (Windows 7), and I've noticed that running the same test script (which
>> calls functions which are a part of a commercial toolbox) on each
>> installation ends up outputting values that are slightly different.
>
> Doe anyone experienced any discrepancy in results outputted by Matlab
> running on different OSs, or does Matlab generate the exact same results
> in any platform?
>
>
> Rui Maciel
>
The results may not be bit-by-bit equal because different OSes use different
libraries and sometimes have difference processors. Results SHOULD be the
same to within numerical precision/roundoff considerations. If that's not
the case, it's possible you get very different answers if you are working
with a very ill-conditioned matrix, for example. So, without the details,
it will be hard for anyone reading this thread to help you out precisely.

--
--Loren

http://blogs.mathworks.com/loren

Tags for this Thread

No tags are associated with 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