How to implement slider with simulation time series?

Hello all,
Can anyone help me out how to implement gui slider with simulation time series?
Ex : I want to update input signal's (ex:speed) previous value/next value based on the slider position (at each sample time inputs are having different values) ? so basically i want to relate between slider,sample time and input data at each sample time.
i.e, if i drag slider position backwards then i want to display previous speed values and when i drag forward means it should display values from the where it left (next values).
example if speed values are 50,100,150,200,250,300 and assume speed value is at 150 when i triggered slide position, and if slide move backwards then values should go backwards i.e, 150,100,50 and if slide move forwards then values should go front i.e, 150,200,250,300...
In between if i move back and forth then also values should go backwards and forward respectively.. example like video player..
please help..

Answers (1)

It seems you just need the basic slider functionality, so whay don't you try the example from documentation.

4 Comments

yes i had gone through that but actually my problem is in updating of an input signal signal values based on the slider position.
Input signals are having different values. so when the slider changes then i want to update signals from the current to previous / next sample time iteration input values.
What you need is simply an action done in respinse to a changed slider position. This is done in a slider callback function. When you want to update your signal only after the slider has been moved, you will use ValueChangedFcn and should you want to update your input signal during the move of the slider, you will put this appropriate changes in a ValueChangingFcn.
yes i already implemented it .. but in 'ValueChangedFcn' function how to store previous status /values of a signals when this function triggered
Oh, if you need to store something between individual calls of the callback function, you have to store it in aa global variable, so-called property of your app..

Sign in to comment.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Tags

Asked:

on 11 Oct 2022

Commented:

on 11 Oct 2022

Community Treasure Hunt

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

Start Hunting!