Updating matlab vectorizing.