MATLAB App Designer fetch data from .m file
11 views (last 30 days)
I've a plot function in .m file. Can I plot the same figure inside App Designer with data being fetch from .m file continuously? How to achieve this?
For example, Suppose I've a test.m file and I want to plot it in App Designer.
T = figure(1);
plot(x,y);axis([x(n) x(n+Dx) y1 y2]);
Or Is it only possible to have a button in App designer and on clicking it, pop up figures appears?
Mehmed Saad on 27 Aug 2020
Edited: Mehmed Saad on 27 Aug 2020
if you call this function in app designer it will create an outside figure so you need to edit it a bit
You need to remove
T = figure(1)
add a UIAxes in you app
for hold on use
app.UIAxes.NextPlot = 'add';
app.UIAxes.XLim = [x(n) x(n+Dx)];
app.UIAxes.YLim = [y1 y2];