Where you put, for example
k.name=get(hObject,'String')
in a callback, k there is just a local variable. As such it goes out of scope as soon as the callback completes.
What you need to do is attach this to the handles structure of the GUI, something more like:
handles.k.name = get( hObject, 'String' )
guidata( hObject, handles );
That last line is important to always include otherwise your changes to the handles structure will also be local to the callback function and lost after it completes.
Obviously you then also need to update your final callback equivalently:
If you prefer you can ignore the text/edit box callbacks altogether and just collect up all the components from the UI under your pushbutton callback. That is often preferable if you do not need real time updating of the parameters in the underlying storage - i.e. if you are only going to use the values current at the time of clicking the pushbutton and don't care if the user changes their mind 27 times on what values they enter on the UI.
Best Answer