[Top][All Lists]

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

Re: matlab incompatibility ?

From: Dirk Laurie
Subject: Re: matlab incompatibility ?
Date: Mon, 14 Sep 1998 17:53:00 +0200 (SAT)

Muzaffer Kal wrote:
> hi,
> I have a small matlab program with which I am having some problems. One was
> a bogus problem which resulted from using DOS formatted text files (cr-lf vs
> lf only (or cr only ?) in unix). When I saved all my .m files in unix mode,
> it went away. I am still seeing another problem though. The program is
> calling a function wich returns a vector as follows:
> octave:1> ap = apflat2(5,.5);
> octave:2> ap
> ap =
>       1.31234
>       .....
>       .....
>       etc.
> then it saves a certain run in an array of vectors
> octave:3>apvec(i, :) = ap;
> at this point I get the following error:
> error: A(I,J) = X; X must be a scalar or the number of elements in I must
> match the number of rows in X etc.
> I don't know much matlab but the code looks like it is trying to save the
> vector ap in apvec with some auto-allocation. Is this true ? Does octave
> support the same thing ? Do I have to pre-allocate the apvec for this to
> work in octave  ? How do I do that ?

Invoke octave by

  octave --traditional

and it becomes much more Matlab-compatible (not everyone regards
that as a good thing)


reply via email to

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