Calculation Notation using Single Quotes in MATLAB

Viewed 45

I am trying to evaluate and rewrite old code from a former co-worker that was written in MATLAB and convert into Python. I've never seen the following quote notation used before for the calculation of c below and am curious about what it is actually doing.

a = [25,30,35];
b = [5,10,15];

c = a'\b'  % result is single value of 0.3455

The actual application of this process is used with multi-degree variables but I figured I would break it down into a much simpler function.

1 Answers

there is no "quotes" notation here. The last line is just

c=ctranspose(a)\ctranspose(b)

the sign ' is just the Complex conjugate transpose of a vector or array in matlab...

As for the \ sign, this is just a short for solving systems of linear equations, as mentioned in the comment.

Related