How do i make user input the name of the file?

15 次查看(过去 30 天)
close all
format long
fileName = input('Please enter your name==>', 's');
fprintf('\n');
fid=fopen('fileName.txt','w');

回答(1 个)

Roofus Milton
Roofus Milton 2019-11-25
Try uigetfile.
[file,path] = uigetfile('*.m');

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by