Hi,
It seems like you're working on making an interactive calculator but are having trouble connecting the input fields with the graphical display (also referred to as the plot graph).
A possible way to resolve this is by using callback functions, these functions can be initiated in multiple ways, for example: when you press the "plot graph" button or even when you change the value in an input field. Here’s an example of the same:
- Create a ButtonPushed callback by clicking on the "plot" button.
- Make changes to the code according to the requirements.
properties (Access = private)
methods (Access = private)
function plotAxis(app, event)
app.X = linspace(1, double(app.XEditField.Value), 100);
app.Y = linspace(1, double(app.YEditField.Value), 100);
plot(app.UIAxes, app.X, app.Y);
In the above example, a callback function is used which is initiated called when the “plot” button is clicked.
I hope this helps, thanks!