How do I make multiple folders with specific names?
Show older comments
I am a real beginner here, so this might be a very stupid question, but can someone explain to me who I can make multiple folders at once? I created a cell array with all the names, now I want the folders to have the same name so I can put my data into it ;)
So I have my cell array with the names I need to have:
connames = {'remembered', 'forgotten', 'remembered-forgotten', 'reforgotten-remembered', 'weak', 'strong', 'weak-strong', 'strong-weak', 'strong-forgotten', 'weak-forgotten' }
And then I want directories containing these names:
clear condir; condir = fullfile(dirs.root,'modelcontrasts',connames);
if ~exist(condir,'dir'); mkdir (condir); end
It however doesn't work like this. What should I do? And why doesn't this work?
Accepted Answer
More Answers (1)
MD SHAHNAWAZ RAZA
on 7 Apr 2018
0 votes
Thank you so much. This code is working fine.
Categories
Find more on Matrix Indexing 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!