OKPEDIA MATLAB EN VETTORI

How to find the cross product of two vectors in Matlab and Octave

To calculate the cross product of two vectors on Matlab and Octave, we use the function cross()

cross(a,b)

The parameters a, b are two vectors.

The function calculates the cross product of the two vectors a x b.

Example

Define two vectors

a = [3; 4; 5]
b = [1; 2; 3]

Calculate the cross product a x b using the function cross()

cross(a,b)

The result is the vector

2
-4
2

https://how.okpedia.org/en/matlab/how-to-find-the-cross-product-of-two-vectors-in-matlab-and-octave


Report an error or share a suggestion to enhance this page


Arrays and Vectors


FacebookTwitterLinkedinLinkedin