当前位置:网站首页>[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 .
边栏推荐
- ImageAI安装
- UI (New ui:: MainWindow) troubleshooting
- [personal notes] PHP common functions - custom functions
- Basic syntax of unity script (6) - specific folder
- ThreadLocal详解
- aaaaaaaaaaaaa
- This article describes the step-by-step process of starting the NFT platform project
- Visual slam Lecture 3 -- Lie groups and Lie Algebras
- [designmode] builder model
- Oracle的md5
猜你喜欢
[yolo3d]: real time detection of end-to-end 3D point cloud input
SQL Yiwen get window function
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
Detailed explanation of ThreadLocal
蓝桥杯单片机省赛第六届
接口调试工具模拟Post上传文件——ApiPost
蓝桥杯单片机省赛第九届
The fourth provincial competition of Bluebridge cup single chip microcomputer
蓝桥杯单片机省赛第十届
【直播回顾】战码先锋首期8节直播完美落幕,下期敬请期待!
随机推荐
Retrofit's callback hell is really vulnerable in kotlin synergy mode
[database]jdbc
Kubernetes cluster storageclass persistent storage resource core concept and use
Which of PMP and software has the highest gold content?
The 9th Blue Bridge Cup single chip microcomputer provincial competition
Kotlin basic learning 17
ImageAI安装
The second game of the 11th provincial single chip microcomputer competition of the Blue Bridge Cup
The 5th Blue Bridge Cup single chip microcomputer provincial competition
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
Blue Bridge Cup single chip microcomputer sixth temperature recorder
MySQL之账号管理
Failed to upgrade schema, error: “file does not exist
[punch in] flip the string (simple)
Merge interval, linked list, array
Unity脚本的基础语法(6)-特定文件夹
h5中的页面显示隐藏执行事件
Pointer array & array pointer
蓝桥杯单片机省赛第十一届第二场
蓝桥杯单片机省赛第六届