[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passing values to function

From: Paolo Ariano
Subject: Re: passing values to function
Date: Fri, 31 Jan 2003 09:28:27 -0600

Il mar, 2003-01-28 alle 17:33, Heber Farnsworth ha scritto: 
> If I understand your problem correctly then the best way to solve it is 
> to define a global variable A and write you function as

sorry but i don't understand, i was reading also the octave manual but
how to pass a global variable to a function:

here i define a global varable A:

svx = (std(mat(3,:)))^2;
svy = (std(mat(4,:)))^2;
global A=(sqrt((svx+svy)/2))    

here i define the function and i try to pass the global variable A to
this function but probably there is a big mistake:
function y = f (x,A)  
y =(x/A**2)*exp(-x**2/(2*A**2)) ;

but nothing. :(

thanks a lot

Paolo Ariano                                  
Neuroscience PhD Student                      
DBAU & INFM Turin (Italy)                     

Meglio un professore povero che un asino ricco -- Meo  

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:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]