How can i open a file that the user inputs ?

3 次查看(过去 30 天)
Is this right ?
FileID = input('please enter the name of your file');
fopen(FileID);

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-9-25
Read this
help fopen
help textscan
help fprintf

更多回答(1 个)

Jan
Jan 2013-9-25
Better use uigetfile, because reduces the chance of typos.

类别

Help CenterFile Exchange 中查找有关 Low-Level File I/O 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by