creating folder in matlab
Show older comments
how can i create a folder in matlab which will store all my text files in it
Answers (2)
% create folder (in current folder)
folder = "mydir";
mkdir(folder);
% save data in a file in the folder
a = rand(3);
save(fullfile(folder, 'test.txt'), 'a', '-ascii');
% show the file
type mydir/test.txt
Categories
Find more on Low-Level File I/O 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!