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

8 次查看(过去 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 中查找有关 Workspace Variables and MAT-Files 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by