[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
argv
From: |
Paolo Ariano |
Subject: |
argv |
Date: |
16 Nov 2001 17:20:39 +0100 |
my function function well now (thanks to Mirek) interactively but noe
i'd like to make it self-standing, i can't pass more than one argument:
function graph(filename,grafico);
gset term postscript eps enhanced color solid "helvetica" 14;
gset([ 'title "', filename, '"' ]);
gset([ 'output "', grafico, '"' ])
for t=1:4
[hmatt,matt] = histot(filename,t);
subplot (2,2,t);
bar (hmatt(1,:),hmatt(2,:));
endfor
oneplot
endfunction
for i = 1:nargin
graph(argv(i,:))
endfor
but when i type: graph data_file_input grafic_file_output
error: `grafico' undefined near line 67 column 22
error: evaluating expression near line 67, column 22
error: evaluating argument list element number 1
error: evaluating index expression near line 67, column 3
error: called from `graph'
why i can't sende my second parameter grafic_file_output to the function
? i've also tried with some printf but grafico is not defined only the
first filename is well defined
thanks
paolo
--
Paolo Ariano
Neuroscience PhD student address@hidden
Others address@hidden
"Se la mente umana fosse semplice abbastanza
per essere capita, noi saremmo troppo semplici
per capirla." -- Pat Bahn
-------------------------------------------------------------
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
-------------------------------------------------------------
- argv,
Paolo Ariano <=
- argv, John W. Eaton, 2001/11/16