Text area output method in MATLAB-Appdesigner (reorganized text area)

Text area output method in MATLAB-Appdesigner

For a small case of using MATLAB-Appdesigner, please refer to another article
link

First create a text area, drag the "Text Area" from the component library on the left to the design view, the name of this view in the component browser is "DIstanceTextArea",

Then first create a callback function, assuming that a variable "SPEED" appears during the calculation process, and you want to output the "SPEED" string, you can enter it in the callback function

app.DIstanceTextArea.Value = SPEED;   %输出字符串

If you want to output the value corresponding to the variable "speed"; you can enter it in the callback function

app.DIstanceTextArea.Value = num2str(speed);   %输出变量数值

insert image description here

There is a function in the menu bar - "combination", which will be highlighted when the "text area" appears in the design view

insert image description here

At this time, the "text area" can be split or combined. The small case I made is as follows;
insert image description here
different input and output can be realized according to your own needs. The output format can be numbered according to the order in which the designed "text area" appears. The specific format as follows:

app.DIstanceTextArea_1.Value = num2str(V_log_gauss);
app.DIstanceTextArea_2.Value = num2str(R_log_gauss);

Guess you like

Origin blog.csdn.net/ruredfive/article/details/118487979