10/17/2017

Introduction

Here we will load data for plotting with plotly on the next slide. The dataset is for the function called Mexican Hat wavelet (see Wikipedia)

mh <-  function(x,y,sigma = 1) {
  return((1/(pi*(sigma**2))) * 
           (1 - 0.5*((x**2 + y **2)/sigma**2)) * 
           exp(1)**(-((x**2 + y **2)/2*sigma**2)))
}
range <- seq(from = -5, to = 5, by = 0.1)
mh_mat <- matrix(0, nrow = length(range), ncol = length(range))
for(x in seq_along(range)) {
  for(y in seq_along(range)) {
    mh_mat[x,y] <- mh(range[x], range[y], sigma = 0.95)
  }
}

Plotly figure of the Mexican Hat wavelet

Thank you