MATLAB: How to get the data from edit box of GUI and use in other .m file
getting data from guiguiMATLABmfile
Hello ppl… I want to know that how to use the data or value in the edit box of the GUI and I want to use the same data in some other .m file.. please let me know asap
thanks and regards madhu
Best Answer
Use get():
myVar = get(handleToEditBox, 'String');
Then you can save it to a mat file with save
save(matFullFileName, 'myVar');
that the other m-file can read in with load(matFullFileName).
Theuiputfile only creates the filename and filepath based on where the user wants to save the file. You need to actually write the save command AFTERuiputfile.
[filename, pathname] = uiputfile('*.mat', 'Save the file as');
Best Answer