From help-octave-request at bevo dot che dot wisc dot edu Tue Jan 28 10:21:16 2003 Subject: passing values to function From: Paolo Ariano To: help-octave at bevo dot che dot wisc dot edu Date: Tue, 28 Jan 2003 10:10:07 -0600 hi * (all) thanks for the suggestions on fitting, now i'm integrating a lot of data in single files and i ought to write a int.ve to make it automatic but at the moment i can't understand how to pass a value to a function defined to be integrated: at the moment i define the function and put the value that change for every set of data (in this case is 0.051165): function y = f (x) y =(x/0.051165**2)*exp(-x**2/(2*0.051165**2)) ; endfunction and then for i=1:columns(l) [v(i)] = quad ("f", l(i), l(i+1)); endfor i'd like to put all in a function but how to put the right function in "f" and to pass the value as a variable ? thanks a lot probably is not so clear paolo -- Paolo Ariano Neuroscience PhD Student DBAU & INFM Turin (Italy) La liberta' in coppia si dimezza -- Io _____________________________________________________________________ For your security, this mail has been scanned and protected by Inflex ------------------------------------------------------------- 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 -------------------------------------------------------------