Hello, I need to define a function that will execute function f on the elements of an input array that meet a certain condition, and execute function g on the other elements as in the following code in C. How to do this efficiently in J?
for (i = 0; i < N; i++) { if (condition(input[i])) { output[i] = f(input[i]); } else { output[i] = g(input[i]); } } Martin ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm