Error in GUI - Error while evaluating uicontrol Callback, Attempt to reference field of non-structure array.

1 view (last 30 days)
Hi. I'm new to Matlab. I got this code from my friend and while trying to work it throws error.
The project is in also attached. Any help will be grateful. PS I'm running matlab R2010a provided by university on Windows 7 x64 system

Answers (1)

Walter Roberson
Walter Roberson on 19 May 2015
The GUIDE code has been generated for use with MATLAB R2014b or later, and you are attempting to use it with a release earlier than that.
In the case of that particular error, you would need to edit to code to change from
handles.value = hObject.Value;
to
handles.value = get(hObject, 'Value');
It is likely that there are numerous other places that similar problems would occur.
If you get your friend to open the code, and then go into the MATLAB Preferences and request backwards compatibility ("-v6") when saving GUIDE files, and then save a copy to another name, then I think it might create a version you can use. (Your friend should change preferences back afterwards.) See http://www.mathworks.com/help/matlab/creating_guis/guide-preferences.html
  2 Comments
Walter Roberson
Walter Roberson on 20 May 2015
Please use the property inspector in GUIDE to find the popup. Examine its properties and tell us what the Value property is set to, and what the String property is set to.

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!