This video explains how to code a slider in a MATLAB GUI. It also shows how to change the 'Min', 'Max', and 'Value' arguments to alter the range of the slider.
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.