Manipulation of plots
Versione 1.0.1 (1,95 MB) da
Peter Nagy
The function works just as Mathematica's manipulate function. It allows the user to change the plotted data dynamically on a GUI.
The function is similar to Mathematica's 'manipulate' function providing an interactive user interface for visulizing the effect of changing a variable on an expression/plot. The variables specified by the command are manipulated by sliders in the graphical user interface. If you click on the 'Stop rescaling' checkbox, the scale will not be rescaled during manipulation, i.e., the scale limits are frozen at the values when the checkbox was clicked.
Syntax:
manipulate(command,{var1,low,high,step},{var2,low,high,step},...,plotSize);
'command' is the expression that is manipulated. It has to be enclosed between single quotation marks, and it has to contain the variable whose value is to be manipulated.
{var1,low,high,step} - a cell (or a series of cells if multiple variables are manipulated) that contains the variable name placed between single quotation marks, its lowest and highest value, and optionally a step size, e.g., {'t',0,100}, {'s',0,10,0.5}
plotSize - an optional parameter specifying the X and Y size of the plot, e.g. [600 400]
Examples:
manipulate('plot(x,y(:,t))',{'t',1,40})
manipulate('plot(x,medfilt1(y(:,t),q));set(gca,''ylim'',[-1 1])',{'t',1,40,1},{'q',1,51,10},[600 400])
manipulate('plot(xmesh,freeEgf(:,t));title(num2str(timesToPlot(t)))',{'t',1,numel(timesToPlot)})
Issue the following command to test the function with the sample data:
manipulate('plot(ysa(:,s,a))',{'s',1,21},{'a',1,21})
Cita come
Peter Nagy (2024). Manipulation of plots (https://www.mathworks.com/matlabcentral/fileexchange/156881-manipulation-of-plots), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2023b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxTag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.1 |