From: sal22 on
When I change those lines to
set(freq,'Value',sliderValue); %sets freq when slider changes

and don't include the handles portion i get.

"Error using ==> set Invalid handle object"

I get an error in that line when I try and change the slider