tesi t wrote:
Please post these general Octave questions to the appropriate forum,
i.e., help-octave ML rather than octave-forge ML.
Octave-forge has nothing to do with this particular issue, other than
hosting a Windows octave-3.2.4 binary.
Read on....
> In Octave Forge (i.e. Octave 3.2.4) I type:
>
> > vector = [1 2 3 4 5]
> > [vector; zeros(1,8-8)]
>
> Then I get this answer:
> *error: number of columns must match (0 != 5)*
>
> Now, if I type:
> > zeros(1,8-8)
> > [vector; []]
>
> I got the correct answer:
> *ans = 1 2 3 4 5*
>
> Matlab doesn't complains about the first two lines and gives the correct
> answer.
...correct?
octave-3.3.91.exe:7> vector = [1 2 3 4 5]
vector =
1 2 3 4 5
octave-3.3.91.exe:8> [vector; zeros(1,8-8)]
ans =
1 2 3 4 5
So yes, newer Octave versions do what you apparently want.
But whether this was a bug or not, I can't say for sure.
Either way, the dimensions of the upper and lower row you want to create
don't match, no matter if the lower row is essentially void or not.
IMO it isn't very "clean" code but I can imagine that similar code can
be generated in scripts.
P.
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev