I combined three categorical arrays and obtained a 1000x3 matrix (associated with 1000 images I am working on). Basically, one of the three variables holds the path to the images, giving something along the lines of:
Users\MyUserName\Desktop\MyProject\MyImages\dogs1\dogs1.1.png Users\MyUserName\Desktop\MyProject\MyImages\dogs1\dogs1.2.png Users\MyUserName\Desktop\MyProject\MyImages\dogs2\dogs2.1.png
Assuming that the folder depth is the same. you can use get the subfolder name like this.
s = ["Users\MyUserName\Desktop\MyProject\MyImages\dogs1\dogs1.1.png"; "Users\MyUserName\Desktop\MyProject\MyImages\dogs1\dogs1.2.png"; "Users\MyUserName\Desktop\MyProject\MyImages\dogs2\dogs2.1.png"]; splitpath = split(s,filesep); subfolder = splitpath(:,end-1); % you can convert it to categorical if you wish. cat_folder = categorical(subfolder);
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.