Clear Filters
Clear Filters

uigetfile and fileread combined

1 view (last 30 days)
Hi i can open my file by use of
S = fileread('coord.txt')
but i want to combine this to my other code where i use
[filename,pathname] = uigetfile({'*.txt'},'Load Coordinates for structure');
so make S still read the file like before with fileread but i want to be able to combine this to a pop up window

Accepted Answer

Walter Roberson
Walter Roberson on 7 Nov 2019
fullname = fullfile(pathname, filename);
S = fileread(fullname);

More Answers (0)


Find more on Get Started with MATLAB in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!