|
From: | Adam Spontarelli |
Subject: | Re: matlab to octave code errors |
Date: | Tue, 9 Jun 2009 14:28:16 -0400 |
error: evaluating binary operator `-' near line 144, column 16
error: evaluating assignment _expression_ near line 144, column 8
error: evaluating for command near line 140, column 1
-Smed
On 9-Jun-2009, John W. Eaton wrote:I looked at fixing this problem, but I don't see a simple solution.
| On 9-Jun-2009, smed wrote:
|
| | Ivan Sutoris wrote:
| | >
| | > Hi
| | >
| | > If it works in Matlab, then probably the "deal" function works
| | > differently in Octave. You can try to rewrite line 54 in two separate
| | > lines (though I didn't test it, as your program requires additional
| | > input files):
| | >
| | > % [N, X(N,:)]=deal(TMP(1),TMP(2:1+NDIM));
| | > N = TMP(1);
| | > X(N,:) = TMP(2:1+NDIM);
|
| It's not a problem with deal, but with the way multi-assignments are
| handled. Apparently Matlab is creating the variable N before
| evaluating the second element in the assignment and Octave is not.
| This problem should probably be fixed, but as Ivan notes, you can
| easily work around it yourself by using a temporary variable.
I'm starting a new thread on the maintainers list about it.
jwe
FEM1D.INP
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |