Is there something similar to MATLAB's function handles in MATA? It seems like it would be similar to function pointers, except that you can specify default parameters to the function.
For instance, if I have a function, func_a(a, b, c), and I want to pass it in as an argument to another function but with b and c pre-specified so it is passed in as a function with only one argument.
In MATLAB, we could do something like this: simp_func_a = @(a)func_a(a, b0, c0), where b0 and c0 are defined in the calling function. Is there any way to do the same in MATA?
Related Posts with Function Handles
Temp file error.I'm having a problem with a little bit of Code that is: Code: merge 1:1 week using `A1', nogen tem…
Margins dxdySo I need to calculate the partial effect at the average and the average partial effect of a probit …
Help replicate a simple Bayesian modelHello everyone, I'm trying to replicate a simple example of Bayesian Analysis as in the Federal Fun…
R squared and Adjusted R squared values on xtreg (random effects panel regression)Hello everyone! I am doing my dissertation which requires me to do some random effects panel data r…
How to add leading zeros for string variables containing both numbers and lettersHi Statalisters, I try to add leading zeros for my string variable named cusip by using the code -g…
Subscribe to:
Post Comments (Atom)
0 Response to Function Handles
Post a Comment