Force MATLAB to make only commas as column separators -
the other day discovered following bug in couple of places in matlab code
i wanted enter column vector in matlab script
[a-b, c-d e-f] where a,b,c,d,e,f long expressions in variables.
and entered in
[ -b ; c -d ; e -f] now matlab interprets second matrix 3x2 matrix instead of column vector. there way/command/function force matlab use comma , not white space characters column separator matrices ?
assuming have piece of code in want have column vectors , no matrix, there quick solution:
replace {space}+ +
replace {space}- -
it quite safe , unless have complicated expressions in vector should trick.
Comments
Post a Comment