Qu

outer

Builtin index · Core maths

outer(u, v)

Input: u, v · Output: no output

What it is

Outer product u·vᵀ: a len(u)×len(v) Mat of u[i]·v[j], whatever the orientation of the two vectors. Empty or complex input is an error.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
outer(u, v)
u Mat or vectornot documented yet
v Mat or vectornot documented yet
not documented yetEmpty or complex input is an error.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

# `grid` does not depend on `p`, so building it per call is waste.

grid   = outer(f, t)            # K x N, built ONCE

shape(p) := sum(A .* cos(grid + p), axis = 0)

from numerics-dsp