Manipulation of plots

Version 1.0.1 (1.95 MB) by Peter Nagy
The function works just as Mathematica's manipulate function. It allows the user to change the plotted data dynamically on a GUI.
10 Downloads
Updated 29 Dec 2023

View License

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})

Cite As

Peter Nagy (2024). Manipulation of plots (https://www.mathworks.com/matlabcentral/fileexchange/156881-manipulation-of-plots), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.1