Placing value in gui static text
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Struct contents reference from a non-struct array object.
I built a gui to do a calculation when I press the start push button. I then wanted this value to display in a static text box. The issue is that when I press the start button the static wants the value at that moment but there isn't a value until the calculation is finished. How do I have the static box wait until the calculation is finished. (This is at least what I think the problem is, the value is not there when it ask for it).
The code for my static text box
average_weighted_elevation_factor = handles.awef;
set(handles.text11, 'String', average_weighted_elevation_factor);
0 Commenti
Risposte (1)
Walter Roberson
il 15 Giu 2017
No, if you are getting "Struct contents reference from a non-struct array object." somewhere in those two lines of code, then somehow your handles variable exists but is not a struct .
If you are using GUIDE, then there is a circumstance under which this can happen: namely that during the various CreateFcn callbacks, the handles variable has not yet been set up.
However, it does not sound as if you are putting this code into a CreateFcn callback, so something else is probably writing on top of your handles variable. We would need to see the code to say what is happening.
0 Commenti
Vedere anche
Categorie
Scopri di più su Entering Commands in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!