ERROR: (execution) Invalid argument to function.
operation : SQRT at line 4121 column 1
You can't take a square root of a negative number. You get a negative number from
cov = x1 + x2 - x3;
I don't think this is really a way to obtain a covariance matrix, and I have never seen anyone subtract a covariance from another covariance matrix, so I'm not really sure why you are doing this subtraction.
... View more