Reference to nonexistent field 'xdot1'.
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Walter Roberson
2021 年 5 月 1 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!