From: ImageAnalyst on
You could think of a million different methods. Who cares? The only
one that counts is the one to do what you want it to do. What do you
want to do? I'm sure you don't just want to apply some arbitrary
operation I just made up. Why don't you post an image or signal and
let's see if adaptive thresholding is even necessary. Maybe it's not.

There is an adaptive contrast stretch in the Image Processing Toolbox
called contrast limited adaptive histogram equalization (CLAHE). It's
done via the adapthisteq() function. It's not thresholding though -
it's more of a contrast enhancement. I think it should also work on
1D signals in addition to images.