Problem in MATLAB GUI. Invalid or deleted object..
1 次查看(过去 30 天)
显示 更早的评论
set(handles.scale_box,'enable','on'); % This line works
st_scale = st_variogram_pooled(data_train); % external code to calculate scale
set(handles.scale_box, 'String', st_scale);% This line gives the above error
% All set commands give the error from here on in the callback
4 个评论
Abhishek Maurya
2018-8-29
Thanks, Shrey for asking this ques. I had the same problem and now I have figured.
回答(1 个)
Shameer Parmar
2016-6-9
According to me, it seems like the function 'st_variogram_pooled(data_train)' is calculating the scale in numeric format, so the value of variable 'st_scale' will be in numeric format and you are trying to put it into string format for GUI field 'scale_box' in next set() command.
Try to use:
set(handles.scale_box, 'String', num2str(st_scale));
same for all other set commands. Convert num into string using num2str command as I shown above.
2 个评论
Shameer Parmar
2016-6-13
Ok, so it seems the problem with function "st_variogram_pooled(data_train)", Can you please provide the details about this function. like logic inside this function or please attach your files so that I can debug and help you..
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!