[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
overloading a function as a structure
From: |
Tom Holroyd |
Subject: |
overloading a function as a structure |
Date: |
Mon, 09 May 2005 19:18:45 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) |
This one's particularly nasty.
octave:1> grid.pos = 0
usage: grid ("on" | "off")
error: evaluating if command near line 40, column 3
error: called from `grid' in file
`/usr/local/share/octave/2.1.69/m/plot/grid.m'
Matlab just tosses the definition of the grid function, and creates a
structure called grid.
Worse, this line:
grid.pos = grid.pos(:,cfg.constr.expand) .* a
gets a syntax error, though in Matlab it doesn't, presumably because
grid is defined somewhere above. By itself it throws an error, but in
the context of the function it doesn't.
Is there a way to undefine a function? "clear grid" beforehand
doesn't do it.
--
Dr. Tom Holroyd
"A man of genius makes no mistakes. His errors are volitional and
are the portals of discovery." -- James Joyce
-------------------------------------------------------------
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
-------------------------------------------------------------
- overloading a function as a structure,
Tom Holroyd <=