Is this possible to store digits from particular format which has been used to name binary images in excel sheet?

1 view (last 30 days)
I have 1000 binary images in a folder. A particular name pattern has been assigned for each of the images like P1_G1_1,P1_G1_2, P1_G1_3 and so on upto P1_G1_10 then starting from P1_G2_1, P1_G2_2,P1_G2_3 ........upto P1_G2_10. In this way the name sequence ends with P10_G10_10. How to store only no concatenated with G letter using loop. Later I have to store all these to an excel sheet. Please help me in doing this.

Accepted Answer

Ameer Hamza
Ameer Hamza on 8 May 2018
You can generate all the names using following loop
names = cell(1000, 1);
count = 1;
for ii = 1:10
for jj = 1:10
for kk = 1:10
names{count} = ['P' num2str(ii) '_G' num2str(jj) '_' num2str(kk)];
count = count+1;
end
end
end

More Answers (0)

Categories

Find more on Images 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!