"I was under the impression, that if i use save only the functions workspace will be saved."
Yep, as confirmed by,
help save
save Save workspace variables to file.
save(FILENAME) stores all variables from the current workspace in a
MATLAB formatted binary file (MAT-file) called FILENAME
"Does hObject include all GUI objects in the function workspace?"
No. hObject, which is the handle to the GUI object that contains the save_callback() callback function.
Your save() funciton call should do what you're describing. It should save all variables in the save_callback() workspace that come prior to save(). If you're just trying to save the variable x,
save('filename.mat', 'x');
Best Answer