spTrTDense

Purpose

Multiplies a sparse matrix transposed by a dense matrix.

Format

y = spTrTDense(s, d)
Parameters:
  • s (NxM sparse matrix) – sparse data matrix.
  • d (NxL dense matrix) – dense data matrix.
Returns:

y (MxL dense matrix) – the result of \(s\*d\).

Examples

sparse matrix s;

// Create a 4x4 sparse identity matrix
s = spEye(4);

// Create dense matrix
d = rndn(4, 4);

y =  spTrTDense(s, d);

Remarks

This may also be accomplished by the following code:

y = s'*d;

However, spTrTDense() will be more efficient.

See also

Functions spTScalar()