Fast implementation of mixed programming of vc++ and matlab