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

13 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');

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!