[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
matlab incompatibility ?
From: |
Muzaffer Kal |
Subject: |
matlab incompatibility ? |
Date: |
Sat, 5 Sep 1998 21:07:00 -0700 |
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 ?
thanks,
Muzaffer
- matlab incompatibility ?,
Muzaffer Kal <=