function debug_example x = [1 2 3 4] xn = unit_scale_data(x) % second call will cause an error - x is 2-D. x = magic(2) xn = unit_scale_data(x)