Initial commit

This commit is contained in:
github-classroom[bot] 2024-11-29 09:50:03 +00:00 committed by GitHub
commit 686dcaf351
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 6230 additions and 0 deletions

View file

@ -0,0 +1,13 @@
// A useful filter, behaves like a smoothly parameterized smooth Heaviside
// function.
//
// Inputs:
// x input scalar (-inf, inf)
// t control steepness of step function: --> 0 more linear, --> inf more like
// Heaviside function (piecewise constant function x<0--> -1 , x>0 --> 1)
// Returns scalar value
float smooth_heaviside( float x, float t)
{
return (1./(1.+exp(-2.*t*(x)))-1./2.)/(1./(1.+exp(-2.*t*1.))-1./2.);
}