File Exchange

image thumbnail


version (5.81 KB) by Danielle Ripsman
A flexible slider creation tool, that allows for multiple slides along a single axis.


Updated 15 Sep 2014

View Version History

View License

I noticed a bunch of threads discussing multi-slide slider objects, but couldn't find any that suited my needs. I've tested this code on multiple platforms, but since this is my first posting attempt there may be incompatibilities - feel free to comment and let me know if you run into these or any other issues.

For a basic demonstration, create the following function and place it in the same folder as superSlider:
% Demonstration of the superSlider "object". This function generates a new randomly oriented slider each time the callback is executed.

function sliderCallbackTest(hObject, eventData)

n = .1 + .8*rand(1); %random location for the new slider

% Recursive callback:
slider11 = superSlider(gcf, 'numSlides', 2,'controlColor',[.5 .1 .5],...
'position',[n .05 .05 .7],'stepSize',.1,...

Cite As

Danielle Ripsman (2021). superSlider (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)


Excellent work!
Do you see a chance to change the code so that some kind of event is broadcasted when one of the sliders is being dragged?

sandeep kumar

@Danielle, Thanks Madam. I could get values of slides in a call back function. Is it possible to pass arguments to callback function? I want to modify values of variables which are defined in another function, based on values of slides. I am unable to access variables in callback function which are defined in another function.

Danielle Ripsman

Hey @sandeep, I am female, but I believe you're looking for data retrieval, i.e. infoMatrix = get(sliderHandle, 'UserData').
The first row contains the location of the slider, so infoMatrix(1,1) will be your first slide and infoMatrix(1,2) should be your second slide.

sandeep kumar

Sir, can you please tell how to get current position of slider in case I have created two slider using numSlides=2

Alberto Mora


This works really great for my application!

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: JuGEx - Julich-Brain Gene Expression

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!