% the function called is fictitious, and would replace % bad coordinate values in variables X, Y, and Z with % NaNs in all three of them [X, Y, Z] = nanbadcoords(X, Y, Z);