[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
embedding function
From: |
Q. Peter He |
Subject: |
embedding function |
Date: |
Fri, 14 Sep 2001 09:51:52 -0500 |
Hi all,
I'm trying to write a code which deals with embedding functions:
Here is my code test.m
#!/usr/bin/octave -qH
type=str2num(nth(argv,1));
if type == 1
test1(argv);
else
test2(argv);
endif
function test1(...)
argv
endfunction
function test2(...)
argv
endfunction
When I tried to run this code, I got the following message:
error: 'test1' undefined near line 4 column 3
error: evaluating index expression near line 4, column 3
error: evaluating if command near line 3, column 1
I heard that Octave actually support such type of embedding functions.
Should I define a main function some where?
Thank you!
Peter
-------------------------------------------------------------
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
-------------------------------------------------------------
- embedding function,
Q. Peter He <=