Skip to content

Instantly share code, notes, and snippets.

@Nate-Wessel
Created February 3, 2022 18:45
Show Gist options
  • Save Nate-Wessel/929fb952755aa006bdf18431f09f5768 to your computer and use it in GitHub Desktop.
Save Nate-Wessel/929fb952755aa006bdf18431f09f5768 to your computer and use it in GitHub Desktop.
Gaussian function
// https://en.wikipedia.org/wiki/Gaussian_function
const [height,center,bandwidth] = [1,0,1]
function kernel(x){
return height*Math.exp( - ( ((x-center)**2)/(2*bandwidth**2) ) )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment