How do I create a .m file that will automatically read information into a already created Matlab GUI?
2 ビュー (過去 30 日間)
古いコメントを表示
In my script (sample.m). I want to call another GUI .m script (GUI.m) and input arguements through my scripts into GUI.m. However the GUI just keeps popping up and will not let me automate the process. How can I do this?
For example the first GUI option is to Load an Image. So you click Load and the specify the file. How can I automate this in my sample.m script.
0 件のコメント
回答 (1 件)
Image Analyst
2016 年 10 月 10 日
編集済み: Image Analyst
2016 年 10 月 10 日
It's just a matter of learning how to stuff your data into controls on your GUI. Perhaps this will help: http://blogs.mathworks.com/videos/category/gui-or-guide/
Basically in your OpeningFcn() function, you need to exctract your passed variables from the "varargin" variable. Then assign them to properties of controls on your GUI, like the "Value" or "String" property. For example:
str = varargin{1};
handles.text1.String = str;
dbl = varargin{2};
handles.slider1.Value = dbl;
Or you mgiht like to use MAGIC: http://www.mathworks.com/matlabcentral/fileexchange/24224-magic-matlab-generic-imaging-component
Description
This GUI will help the novice user get up to speed very quickly on using GUI-based applications. Everything is laid out in a very simple Step 1, Step 2, Step 3, etc. layout. It is a very good starting point for a typical image analysis application. This application uses GUIDE to do the user interface design, and has most of the basic controls such as buttons, listboxes, checkboxes, radio buttons, scrollbars, etc. It allows the user to select a folder of images, select one or more images and display them, to select a series of options, and to individually or batch process one or more images. The user can .....
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!