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

1 Ansicht (letzte 30 Tage)
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.

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 8 Mai 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

Weitere Antworten (0)

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by