I have natural sound recordings, and I want the envelop of them. I am using envelope(x,1,'peak'). If there is a big of sound after the main sound finishes, it creates exponential growth at the edge of my waveform. I am currently just setting the end and a few points near the end to 1 to avoid it exploding. Is there any other way to fix this?