[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiple functions in a file
From: |
Andy Adler |
Subject: |
Multiple functions in a file |
Date: |
Fri, 10 Nov 2000 22:04:25 -0500 (EST) |
Is it possible to put multiple function
definitions in a single *m file.
ie. could I do something like this,
and access foo from the outside
--------begin file foo.m-------
function x=foo(y)
x= 1+bar(y);
endfunction
function a=bar(b)
a=b^2;
endfunction
--------end file--------
This code doesn't seem to work as is.
But I'd really like to be able to do this,
as I don't want people to bar to be accessible directly.
thanks
_______________________________________
Andy Adler, address@hidden
-------------------------------------------------------------
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
-------------------------------------------------------------
- Multiple functions in a file,
Andy Adler <=