how i can write this in matlab
1 view (last 30 days)
Walter Roberson on 17 Dec 2020
That is a bit ambiguous, but most likely the MATLAB for that would be
-1.3j * diff(y)
You might notice that this has no i in it. It is likely that you should not use
i - 1.3j * diff(y) %PROBABLY WRONG
In the image you show, i and j are most likely unit vectors along two axes (that are usually mapped to x and y) . MATLAB does not have distinct unit vectors in multiple dimensions, just real values and imaginary values . MATLAB uses both i and j to represent the same value, sqrt(-1), so (for example) 1*i - 1*j would be 1*sqrt(-1) - 1*sqrt(-1) which would be 0.