crossp
Version 1.1 (9.08 KB) by
Hamish
This function calculates the cross product of a velocity/acceleration with an i and j vector.
This function takes a vector in the k direction and cross multiplies with a vector in the i and j direction. It performs k x i and k x j and return a vector in terms of i and j.
Calling the function:
x = crossp(A, B)
where A is the angular velocity/acceleration, and B is the i and j vector.
Vector A can be positive or negative.
Vector B must be represented as a 1x2 vector with column 1 being the i component and column 2 being the j component. i.e B = [ i , j ].
If your direction is negative, i.e. -i, -j and -k, you must bring the negative to the front of the number.
Example:
v = 25(-i) + 34(-j) = -25i - 34j
If your vector is only in the i or j direction, put 0 for the other term.
Example:
v = 50j
The input would be:
v = [0, 50]
Cite As
Hamish (2026). crossp (https://www.mathworks.com/matlabcentral/fileexchange/136774-crossp), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2022a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.1 | forgot to add semicolons |
|
|
| 1.0 |
|
