MATLAB: How to resolve the ‘dot indexing not supported for this type of variable’ error

indexing

I am writing a code where I hit a pushbutton, it shows me a error saying "Dot indexing is not supported for variables of this type". And this error is for the line 268– set(handles.edit6,'string',fullname); fullname is basically the filepath and filename combined together.
Any kind of help will be appreciated. Thank you.

Best Answer

You used GUIDE to construct these GUIs.
When you use GUIDE, then the "handles" structure that is passed into your function always refers to information stored against the figure that the graphic element is in. "handles" is not a global structure, it is a per-GUI structure, and you have constructed three separate GUI.
You need to change
set(handles.edit6,'string',fullname);
to
edit6 = findobj(0, 'tag', 'edit6');
set(edit6, 'string', fullname);
Related Question