当前位置:网站首页>[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 .
边栏推荐
- [mv-3d] - multi view 3D target detection network
- 滴滴开源DELTA:AI开发者可轻松训练自然语言模型
- 5G時代全面到來,淺談移動通信的前世今生
- Influence of air resistance on the trajectory of table tennis
- 蓝桥杯单片机省赛第十届
- [HCIA continuous update] working principle of OSPF Protocol
- leetcode-1380. Lucky number in matrix
- JIT deep analysis
- Failed to upgrade schema, error: “file does not exist
- Kubernetes cluster storageclass persistent storage resource core concept and use
猜你喜欢

Large screen visualization from bronze to the advanced king, you only need a "component reuse"!

"Analysis of 43 cases of MATLAB neural network": Chapter 41 implementation of customized neural network -- personalized modeling and Simulation of neural network

What do you know about stock selling skills and principles

【小技巧】使用matlab GUI以对话框模式读取文件

近段时间天气暴热,所以采集北上广深去年天气数据,制作可视化图看下

The fourth provincial competition of Bluebridge cup single chip microcomputer

The 6th Blue Bridge Cup single chip microcomputer provincial competition

蓝桥杯单片机省赛第六届

Which of PMP and software has the highest gold content?

Review materials of project management PMP high frequency examination sites (8-1)
随机推荐
Flutter中深入了解MaterialApp,常用属性解析
regular expression
Welcome the winter vacation multi school league game 2 partial solution (B, C, D, F, G, H)
The second game of the 11th provincial single chip microcomputer competition of the Blue Bridge Cup
aaaaaaaaaaaaa
Which of PMP and software has the highest gold content?
One of the future trends of SAP ui5: embrace typescript
js生成随机数
Pycharm2021 delete the package warehouse list you added
Lost a few hairs, and finally learned - graph traversal -dfs and BFS
The 8th Blue Bridge Cup single chip microcomputer provincial competition
Oracle common SQL
u本位合约爆仓清算解决方案建议
Merge interval, linked list, array
The first game of the 12th Blue Bridge Cup single chip microcomputer provincial competition
《MATLAB 神經網絡43個案例分析》:第42章 並行運算與神經網絡——基於CPU/GPU的並行神經網絡運算
傅里叶级数
0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed
蓝桥杯单片机省赛第十二届第一场
aaaaaaaaaaaaa