当前位置:网站首页>[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 .
边栏推荐
- Kotlin基础学习 14
- Welcome the winter vacation multi school league game 2 partial solution (B, C, D, F, G, H)
- In depth interpretation of pytest official documents (26) customized pytest assertion error information
- The fourth provincial competition of Bluebridge cup single chip microcomputer
- MySQL之账号管理
- Eight steps of agile development process
- Haute performance et faible puissance Cortex - A53 Core Board | i.mx8m mini
- Set vscode. When double clicking, the selected string includes the $symbol - convenient for PHP operation
- The 8th Blue Bridge Cup single chip microcomputer provincial competition
- NLog使用
猜你喜欢

Set vscode. When double clicking, the selected string includes the $symbol - convenient for PHP operation

蓝桥杯单片机省赛第九届

The first game of the 12th Blue Bridge Cup single chip microcomputer provincial competition

蓝桥杯单片机省赛第八届

The 8th Blue Bridge Cup single chip microcomputer provincial competition

滴滴开源DELTA:AI开发者可轻松训练自然语言模型

Failed to upgrade schema, error: “file does not exist

Unity脚本的基础语法(6)-特定文件夹

蓝桥杯单片机省赛第十一届第二场

0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed
随机推荐
The second game of the 12th provincial single chip microcomputer competition of the Blue Bridge Cup
The 5th Blue Bridge Cup single chip microcomputer provincial competition
Kotlin 基础学习13
蓝桥杯单片机数码管技巧
Kotlin基础学习 14
NLog使用
Kotlin基础学习 15
Introduction to Robotics II. Forward kinematics, MDH method
Custom classloader that breaks parental delegation
5G時代全面到來,淺談移動通信的前世今生
Kotlin基础学习 16
Kotlin basic learning 17
KL divergence is a valuable article
Review materials of project management PMP high frequency examination sites (8-1)
一文彻底理解评分卡开发中——Y的确定(Vintage分析、滚动率分析等)
Fourier series
0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed
[HCIA continuous update] overview of dynamic routing protocol
How about Ping An lifetime cancer insurance?
Unity脚本的基础语法(7)-成员变量和实例化