mv_mult - chung-leong/qb GitHub Wiki

mv_mult - Matrix-Vector multiplication

float[] mv_mult( float[][] $m, float[] $v )

mv_mult() multiplies the matrix m by the vector v.

Parameters:

m - The matrix. It can be a single two-dimensional array or an array of two-dimensional arrays.

v - The vector. It can be a single one-dimensional array or an array of one-dimensional arrays. The width of the vector should match the number of columns in m.

Return Value:

Matrix product of m and v. If either m contains multiple matrices or v contains multiple vectors, the return value will be an array of vectors.

Version

1.0 and above.