use .- instead of bsxfun in var
Merge pull request #3491 from lindahua/var_quickfix

use .- instead of bsxfun in var