Hi,
I have a custom function called get_xs()
that returns a linspaced_vector()
(documentation)
In addition, I have another custom function that uses the returned output of get_xs()
.
real p_a_wins(real p_a, real p_b, int n) {
vector xs;
for (i in 0:n) {
xs = get_xs(i, n, 2);
for (x in xs) {
// do something with x
}
I need to define xs
otherwise it is not in scope. But how should I define xs
if I don’t know the length of it?
Thanks