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
Panel data sample distributionHello Everyone, I am looking for a STATA command which can give sample distribution by year and how…
issue with a codedear colleagues, i am tying to perform a correlation between 2 variables with an if condition but i …
panel vecm with pvar code?Dear all, I want to use panel vecm but as I know there is no stata code to do that directly. Becaus…
Merging questionI am trying to merge two datasets based on two variables: MotherID and PregnancyID. PregnancyID is n…
String variable to numeric variable, -encode- command generates new values.I have a couple hundred thousand income observations within my data. However, when I tried to create…
Subscribe to:
Post Comments (Atom)
0 Response to Function Handles
Post a Comment