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

12 views (last 30 days)
close all
format long
fileName = input('Please enter your name==>', 's');
fprintf('\n');
fid=fopen('fileName.txt','w');

Answers (1)

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

Products

Community Treasure Hunt

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

Start Hunting!