title: Max-filter in matlab?
body: <p>I like to find the envelope of an audio signal using matlab, i.e. the red signal in the picture. I have implemented a max-filter but the implementation is very slow. Does matlab have a built in max-filter or some other function that can calculate the envelope? (I have found a median filter but no max-filter)</p>
  
  <p><img src="https://i.stack.imgur.com/fAClf.png" alt="max-filter applied to an audio signal"></p>