Jump to content
  • Advertisement
Sign in to follow this  

(Matlab) handles not updating

This topic is 2026 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I have a gui and i run this function to get some data and store it in handles.

updateButton2_Callback(hObject, eventdata, handles)


str=sprintf('(based on prodData)\n\nTurbines: %.0f \nLosses: %.1f %% \nPeriod: %.1f yrs\n\nTotal losses: %.1f GWh\nTotal prod: %.1f GWh',count,d(1),d(4),d(2),(3));
guidata(hObject, handles);

I use it in another callback and the data is there and works. But sometimes (not always) when i run another loadFunction (depending on the data) those data (handles.allPark for example) is set to zero.


How can it be set to zero? The only time i set handles.allPark=0 is in the openingFcn and it is not run other then at startup (i have checked).


Is this connected to that i sometimes have to run: (got this tip from the net and it solved another handles-related problem)

handles = guidata(hObject);

Altough i dont understund why such an updata is needed...


Im very confused. Thanks for any help


Edited by suliman

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!