fixed a bug in approx_cca.m