Hi all,
I was wondering if there was a way to write some matlab syntax that can respond to a prompt for user input. When I used this code:
[filename, directory_name] = uigetfile('*.dat', 'example_file.dat');fullname = fullfile(directory_name, filename);data = readcell(fullname);
I get prompted to specify the exact file I want to import into matlab:
(I've blacked out some portions for security reasons)
I wanted to know if there was a way to write some matlab syntax to choose the right file for me, assuming I give the full name of the .dat file I want, in this case, a real file named:
example_file.dat
essentially, I want to declare a newfile name variable within the command window, run my script and have it automatically write data into a file without any user input.
Thanks in advance.
Best Answer