In reply to john.

As I say in this post, you shouldn't think of CHOOSE as equivalent to the IF-THEN/ELSE statement, although they are similar. The general formulation of the CHOOSE statement is to have three vectors as arguments. As I say in this post:
"The CHOOSE function examines each element of the first argument. If an element is nonzero, it returns the corresponding element of the second argument. If an element is zero, it returns the corresponding element of the third argument."

In the general case, therefore, the dimensions of the three arguments must be the same. That's why the CHOOSE function is complaining that the second and third arguments are different dimensions. However, in your example the first argument is a scalar. Although, in principal, CHOOSE could handle this case differently than the general case, that's not what it does, since special-casing leads to its own problems.