functionthApply

Apply soft or hard thresholding

Inputs

TypeNameDefaultDescription
Real[:]u{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}Input vector
Realth5Threshold value
BooleansorhtrueSoft (false) or hard (true) thresholding

Outputs

TypeNameDefaultDescription
Real[:]yzeros(size(u, 1))Vector after thresholding