help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: matlab to octave code errors


From: John W. Eaton
Subject: Re: matlab to octave code errors
Date: Tue, 9 Jun 2009 14:23:09 -0400

On  9-Jun-2009, John W. Eaton wrote:

| 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 looked at fixing this problem, but I don't see a simple solution.
I'm starting a new thread on the maintainers list about it.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]