当前位置:网站首页>[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 .
边栏推荐
- The fourth provincial competition of Bluebridge cup single chip microcomputer
- 高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
- u本位合约爆仓清算解决方案建议
- PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
- Oracle 常用SQL
- Kotlin basic learning 15
- In depth interpretation of pytest official documents (26) customized pytest assertion error information
- "Analysis of 43 cases of MATLAB neural network": Chapter 41 implementation of customized neural network -- personalized modeling and Simulation of neural network
- The 7th Blue Bridge Cup single chip microcomputer provincial competition
- Pycharm2021 delete the package warehouse list you added
猜你喜欢

Basic operations of MySQL database (based on tables)

Interface debugging tool simulates post upload file - apipost

Gradle foundation | customize the plug-in and upload it to jitpack

Influence of air resistance on the trajectory of table tennis

MySQL connection query and subquery
![[designmode] builder model](/img/e8/855934d57eb6868a4d188b2bb1d188.png)
[designmode] builder model

蓝桥杯单片机第四届省赛

微信小程序中 在xwml 中使用外部引入的 js进行判断计算

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

【IBDFE】基于IBDFE的频域均衡matlab仿真
随机推荐
Vite: configure IP access
蓝桥杯单片机省赛第十二届第一场
Gradle foundation | customize the plug-in and upload it to jitpack
In the era of programmers' introspection, five-year-old programmers are afraid to go out for interviews
[database]jdbc
Failed to upgrade schema, error: “file does not exist
Which of PMP and software has the highest gold content?
Kotlin 基础学习13
The 5th Blue Bridge Cup single chip microcomputer provincial competition
[punch in] flip the string (simple)
It took me only 3 months to jump out of the comfort zone and become an automated test engineer for 5 years
蓝桥杯单片机省赛第七届
Qt的网络连接方式
MD5 of Oracle
Lost a few hairs, and finally learned - graph traversal -dfs and BFS
Eight steps of agile development process
Kotlin basic learning 16
[HCIA continuous update] working principle of OSPF Protocol
Kubernetes cluster storageclass persistent storage resource core concept and use
What kind of interview is more effective?