Here's a very odd glitch with CHOOSE that I discovered recently. Try this: a = J(1,6,0); b = J(1,6,1); i = 2; a = choose(i=1,b,a//b); In words, if i = 1, I want 'a' to become 'b', otherwise, I want 'b' to be appended to 'a'. Doesn't work. Now, replace the CHOOSE statement in the code above with the following equivalent if/then/else statement: if i=1 then a = b; else a = a//b; It will work. Why doesn't it work when using the CHOOSE function ?
... View more