当前位置:网站首页>[tips] use Matlab GUI to read files in dialog mode
[tips] use Matlab GUI to read files in dialog mode
2022-07-02 03:42:00 【FPGA and MATLAB】
stay MATLAB Interface design process , It is often necessary to call the dialog box for reading files by pressing the key , It can be realized through the following code :
[filename,pathname]=uigetfile({'*.jpg',' Sample file (*.jpg)';'*,*',' All the files (*.*)'},' Please select a sample file ');
if isequal(filename,0)||isequal(pathname,0)
return;
end
FileName_AVI = [pathname,filename];
here , function GUI Interface , The following dialog box can pop up :
You can see , Prompt in dialog box jpg File format , If it is changed to other , You can also make similar files , Such as txt file , As shown below :
[filename,pathname]=uigetfile({'*.txt',' Sample file (*.txt)';'*,*',' All the files (*.*)'},' Please select a sample file ');
if isequal(filename,0)||isequal(pathname,0)
return;
end
FileName_AVI = [pathname,filename];
here , function GUI Interface , The following dialog box can pop up :
After running , The path of the file will be saved to the variable FileName_AVI in , Then read it .
边栏推荐
猜你喜欢
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
[HCIA continuous update] overview of dynamic routing protocol
Interface debugging tool simulates post upload file - apipost
What do you know about stock selling skills and principles
It took me only 3 months to jump out of the comfort zone and become an automated test engineer for 5 years
Oracle的md5
The 10th Blue Bridge Cup single chip microcomputer provincial competition
滴滴开源DELTA:AI开发者可轻松训练自然语言模型
Detailed explanation of ThreadLocal
[HCIA continuous update] working principle of OSPF Protocol
随机推荐
Gradle foundation | customize the plug-in and upload it to jitpack
How about Ping An lifetime cancer insurance?
One of the future trends of SAP ui5: embrace typescript
[personal notes] PHP common functions - custom functions
Custom classloader that breaks parental delegation
Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes
毕设-基于SSM电影院购票系统
UI (New ui:: MainWindow) troubleshooting
Unity脚本的基础语法(7)-成员变量和实例化
Basic syntax of unity script (8) - collaborative program and destruction method
leetcode-1380. Lucky number in matrix
Failed to upgrade schema, error: “file does not exist
焱融看 | 混合雲時代下,如何制定多雲策略
Kotlin基础学习 15
MySQL之账号管理
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
High performance and low power cortex-a53 core board | i.mx8m Mini
In depth interpretation of pytest official documents (26) customized pytest assertion error information
微信小程序中 在xwml 中使用外部引入的 js进行判断计算
VS2010 plug-in nuget