Matlab to Python (once again)

Viewed 36

Matlab:

sum((wold(:,index)-w(:,index)).^2

Consider that "wold" and "w" are both matrixes of size: 128 x 2

Now, if I understood what that operation should do, the "sum" function should return a single number, correct?

So ".^" is useless and I can simply use "^", which in Python is "**", correct?

Also, I'd like a suggestion from you: what would be the best way to do this in Python?

wold(:,index)

Should I use the "np.arange" function ?

0 Answers
Related