functionthApply
Apply soft or hard thresholding
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:] | u | {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} | Input vector |
| Real | th | 5 | Threshold value |
| Boolean | sorh | true | Soft (false) or hard (true) thresholding |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:] | y | zeros(size(u, 1)) | Vector after thresholding |