Good morning everyone,
I am attempting to make a matrix that lists the directory of all the text files within a folder:
if trued = uigetdir(pwd, 'Select a folder.');f = fullfile(d,'*txt');files = dir(f);l = length(files);file = zeros(1,l);for i = 1:l file(i) = fullfile(d,files(i).name) i = i+1;endend
But I continue to receive this error:
??? In an assignment A(I) = B, the number of elements in B and I must be the same.
Error in ==> open_ex at 9 file(1) = fullfile(d,files(1).name);
Please help, thank you in advance
Best Answer