20-sim webhelp > Language Reference > Functions > Matrix > inner


inner

Navigation:  Language Reference > Functions > Matrix >

inner

Previous pageReturn to chapter overviewNext page

Syntax

y = inner(A,B);

Description

Returns the scalar product of the column vectors A and B. A and B must be vectors of the same length. Inner(A,B) is the same as transpose(A)*B.

Example

A[3] = [1;2;3];

B[3,1] = [4;5;6];

y = inner(A,B);

Limitations

A and B must be vectors of the same size [n,1] or [n]. y must be a scalar.