Updating parameter, plus plot, with slider input "in real time"
69 views (last 30 days)
Show older comments
Corey on 31 Aug 2022
Commented: Corey on 5 Sep 2022
I am fairly new to MATLAB and am working with code that generates eight different subplots from a set of input parameters (the program already exists, and I am just its most recent user)
I want to be able to change these parameters "in real time" by manipulating the sliding bars (creating the sliding bars with the correct properties is as far as I've been able to get so far) and have these plots then update with the new parameters that the slider is set to (also "in real time"), all without having to re-run the function from the command window
Is there a convenient way to do this in MATLAB (ideally without having to rewrite the code for every single one of the subplots)? And if I am able to do this for one parameter, can I simply extrapolate from it to the rest of the parameters?
Seth Furman on 3 Sep 2022
There are two main ways to interactively update a plot with a slider.
1. Create a Live Script with an interactive numeric slider (this is probably what you want).
2. Create an App that incorporates a uislider (this is more customizable but will require more coding).
More Answers (1)
Chunru on 1 Sep 2022
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!