Reference to nonexistent field 'xdot1'.
1 view (last 30 days)
Show older comments
I'm trying to create a GUI and want to input values and have the GUI plot a graph based on these values. Under the callback function for edit1 to edit4 I have the same code but the x1 after handles is x1, xdot1, x2 and xdot2, respectively. When I try to run it and put the values into my GUI, I keep getting the error "Reference to nonexistent variable 'xdot1'. Is there a way to eliminate this error so the GUi creates a graph?
This is my GUI:
This is the graph I am trying to create:
0 Comments
Answers (1)
Walter Roberson
on 1 May 2021
In your OpenFcn initialize the edit field String properties, and initialize the handles.* values appropriately.
Alternatively, do not bother with the edit callbacks unless you want to do input validation. Instead, retrieve the values from the edit fields right in your calculation function.
0 Comments
See Also
Categories
Find more on Specifying Target for Graphics Output in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!