Matlab - Save upon Key Press -
So, what I want to do here. Basically, when a certain key is pressed, then I want to leave a saved function (which thinks uisave to save all the parameters in .mat file) and how will I do it out of my script? I messed around with waiting, but it stops all progress; Unless this event is present, I want a script to continue running. Any help would be greatly appreciated.
Use the 'WindowKeyPressFcn' property of
to your figure. You can set it to point to one of your functions (where you can save):
f = gcf;
handle your window set (gcf, 'windowspress', @ myFun) or you enter a string directly, which will be executed:
< Code> Set (GCF, 'WindowKeyPCN,' 'Disp (' Hello there! Have you pressed a key? '' ''))
You 'WindowKeyReleaseFcn'
Property too
Comments
Post a Comment