Gui help: sliders and plots

I have two separate .m files I'm attempting to combine. One is a gui created through guide with an axes, 5 sliders, and 5 editable text boxes; the other file is a plot of two "objects" created out of a series of coordinates.
My goal specifically was to make the values of the sliders affect the values of variables used in the plot defining my coordinates and then have that displayed onto the gui axes. From what I was able to glean from various videos and help text, I attempted populating/initializing the axes by putting my plot code in the OpeningFcn then defining the plot variables in the slider callbacks for example:
distance_between = get(hObject,'Value');
assignin('base','distance_between', distance_between);
Lastly I tried putting the plot code back into the axes callback to no avail . I don't seem to have a very good grasp over how these work, I was able to get one variable to work as desired by putting the entire plot code into the slider1 callback but I think that's one of the worse ways to do it.
If I could get some help with the first couple sliders
attached are the two files with the plot file labeled mirrorplot and the gui labeled Mirror_ps160 inside of a compressed folder, I'm using R2015a.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by