I want to ask you about the scope of the variables in the Mata, because it seems that the Mata manual does not mention the content of the scope of the variables. Now I need to write a function that will change according to the value of the external variable. For example
b=?;//b is a variable that will change with the previous calculation
real scalar fun(x,y){
z=x+b*y
return(z)
}
b=?;//b is a variable that will change with the previous calculation
real scalar fun(x,y){
z=x+b*y
return(z)
}
Comment