Matlab Calling 'Import Data' with GUI Button

梦想的初衷 提交于 2019-12-06 01:59:57

The function uiimport is used for importing data interactively. This seems to be what gets called by Matlab's toolbar's "import data" button.

Excerpting from the documenatation,

uiimport opens a dialog to interactively load data from a file or the clipboard. MATLAB® displays a preview of the data in the file.

uiimport('-file') presents the file selection dialog first.

S = uiimport(___) stores the resulting variables as fields in the struct S.

So, just set

uiimport('-file');

as the button's callback.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!