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: Ivan Sutoris
Subject: Re: matlab to octave code errors
Date: Tue, 9 Jun 2009 09:02:36 +0200

On Tue, Jun 9, 2009 at 2:55 AM, smed<address@hidden> wrote:
>
> Hi, I'm trying to run Matlab code in Octave, and i'm getting the following
> errors:
>
> warning: function name `fem1d2n' does not agree with function file name
> `C:\Matlab\fem1d.m'
>
> error: `N' undefined near line 54 column 10
> error: evaluating argument list element number 1
> error: evaluating for command near line 52, column 1
> error: called from `fem1d:InputData' in file `C:\Matlab\fem1d.m'
> error: called from `fem1d' in file `C:\Matlab\fem1d.m'
>
> here is the .m file i'm trying to run, thank you for your help:
> http://www.nabble.com/file/p23934669/fem1d.m fem1d.m
>
> -Smed

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);

Regards
Ivan Sutoris


reply via email to

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