[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Whitespace question, [zeros (1, 2), ones (1, 2)]
From: |
Mike Miller |
Subject: |
Re: Whitespace question, [zeros (1, 2), ones (1, 2)] |
Date: |
Sat, 5 Nov 2005 19:40:41 -0600 (CST) |
On Sat, 5 Nov 2005, Paul Roberts wrote:
I think that the problem in this case is the way octave parses array
declarations. In an array declaration, whitespace is treated as an
element delimiter. For example:
a = [1 2 3]
a =
1 2 3
So when you try:
[ones (1,2)]
octave treats it like
[ones,(1,2)]
I checked, and both expressions give the same syntax error that you
mentioned above. So the whitespace between function name and arguments
won't work inside of an array declaration.
Interesting problem. I do not get the parse error on this old version:
GNU Octave, version 2.0.14 (sparc-sun-solaris2.6)
But I do get it on this newer version:
GNU Octave, version 2.1.71 (i686-pc-linux-gnu)
John will probably have something to add.
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Whitespace question, [zeros (1, 2), ones (1, 2)], Steve C. Thompson, 2005/11/05
- Re: Whitespace question, [zeros (1, 2), ones (1, 2)], Paul Roberts, 2005/11/05
- Re: Whitespace question, [zeros (1, 2), ones (1, 2)],
Mike Miller <=
- Prev by Date:
Re: Whitespace question, [zeros (1, 2), ones (1, 2)]
- Next by Date:
Re: Multivariate pdf of a normal distribution
- Previous by thread:
Re: Whitespace question, [zeros (1, 2), ones (1, 2)]
- Next by thread:
Re: Whitespace question, [zeros (1, 2), ones (1, 2)]
- Index(es):