How to get 'set' not to replace values in a textbox each time it is used.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Danielle
el 11 de Oct. de 2017
Respondida: Greg
el 11 de Oct. de 2017
Hello, I am building a GUI from a former properly functioning code. Before I had a number of frintf commands display several outputs into the command window and now I'd like those values to display in a textbox in the GUI. I know that I need to use set and sprintf in order to get these values to display. Alone they are working properly. However, I don't want one output to replace the last each time I set a new value. Does anyone know a way to display all of these values in the textbox without 'set' replacing the previous value each time?
0 comentarios
Respuesta aceptada
Greg
el 11 de Oct. de 2017
You're looking for the word "Append" to describe the behavior you want.
Using set() by itself can only replace all content. If you want to append, you manually create the appended string and set that as the new full content.
old = get(...,'String');
set(...,'String',[old,new]);
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Report Generator en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!