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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -