App Designer: Update Text Area Value with parameter change

68 visualizaciones (últimos 30 días)
Sena Koçak
Sena Koçak el 14 de Mzo. de 2022
Comentada: xiaokai an el 11 de Jun. de 2022
In MATLAB App Designer, I want to change/update the value in the text area object with some parameter change? Could you explain how can I achieve this task?

Respuestas (2)

Cris LaPierre
Cris LaPierre el 14 de Mzo. de 2022
See this page, particularly the code at the very top.
Now just figure out what action you want to trigger the change, and add the code to that callback function.
  1 comentario
Sena Koçak
Sena Koçak el 15 de Mzo. de 2022
Thanks for the answer Cris. Actually, my case is kinda tricky. After pushing a button, my optimization code starts to work. In a text area, I want to show the iteration nymber. As I say, the iteration number is change while the code is still running. However, I cannot manipulate the text area dynamically while the code executes.

Iniciar sesión para comentar.


xiaokai an
xiaokai an el 11 de Jun. de 2022
My answer may help you.
Pass 'app' as a parameter into the m file containing the logic program, and then use it in the m file
app. TextArea. Value = num2str(666666);
Such code rewrites the value of text.
  1 comentario
xiaokai an
xiaokai an el 11 de Jun. de 2022
When the program runs too fast, it may not display normally. You need to add the following pause code near the rewritten code
pause(1);

Iniciar sesión para comentar.

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by