Hi guys,
im new to matlab and even more to app designer but i need to make an app with a UIAxes and a discrete knob, since i have a very long code and uploading it here i'm sure would be painful and boring for y'all i'll make an example of my problem.
Let's say i have a UIAxes and i want to plot a vector here of lenght N (very long), and i have a discrete Knob that have, as an example, 4 values (1, 2, 3, 4). The vector is divided in 4 parts, not equal, and i have the 3 indexes of where it's sliptted and they are stored in a vector ind=[10;25;52].
The result i want is:
- At first it plots the entire vector as i open the app.
- If i move the knob the graph has to change (if Knob.Value=1 the portion of the vector displayed sould be from 0 to ind(1), if is more than 1 and less than 4 the portion should be from ind(i-1) to ind(i), and if it's 4 it has to be from the last index to the end).
- A "RES" button resets the graph showing the full vector.
- The vector cannot be modified
Thank you all for your help and your time, feel free to ask anything or give any general matlab advice. R.