2 Using Matlab

Two calculate the scalar product in Matlab the dot function is used.

Create two vectors:

> A = [4 -1 2]; 

> B = [2 -2 -1];

Calculate the scalar product:

> C = dot(A,B) 

 

    C = 8