フィルターのクリア

code running differently on 2 machines

2 ビュー (過去 30 日間)
darksideofthemoon101
darksideofthemoon101 2011 年 4 月 21 日
Hi,
I'm running code on 2 machines, 1 laptop and 1 desktop. I have an array that comes out of a loop, 'answer1', and the when I execute the code on each machine it comes out differently.
On the laptop the array is 120x1 and has values from 6.5211E-7 to 5.3847E-8. On the desktop the array is the same size bu is all zeros.
I have just noticed that several variables on the desktop version display many elements in the workspace pane, however the variables themselves do seem to contain numbers.
Anyone any ideas? I can attempt to upload code if needed.
Thanks.
  1 件のコメント
Jarrod Rivituso
Jarrod Rivituso 2011 年 4 月 21 日
I would step through the code using the debugger to see where things start to go wrong, and then investigate from there. Sometimes, these things can be as easy as a missing file on one machine or another.

サインインしてコメントする。

採用された回答

William
William 2011 年 4 月 21 日
You could look at several implementation issues for the source of your problem. I've listed a sequence of questions below that may be of help.
Are both machines the same processor? Same processor type x86 vs 64bit? Execute 'eps' on both machines to see what the smallest possible value is. If eps is different then rounding 'errors' may exist. Are you using the same Matlab version?
It is possible that different Matlab versions could include bug fixes.
If you don't control the machines someone may have replaced one of the functions you are using with a local directory or path copy with slightly altered output.
Does the function you are using depend upon random or seed values?
As an alternative to the debugger you could try the profile tool or look at intermediate output.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDebugging and Analysis についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by