changing the dimension representation
Afficher commentaires plus anciens
I have 8 face images (2 diff people with 4 diff expressions each). To arrange the data as multidimensional array, first i put 'people' in rows and 'expressions' in columns using the following code (p=people, e=expressions):
j=2;
k=4;
mydata = cell(j,k);
for p = 1:j
for e = 1:k
fname = sprintf('%d%02d.txt' , p, e);
fid = fopen(fname);
Next,if i want to change the 'expressions' be in the rows and 'people' in column, how can i do that without changing the file names. I name the image as 101-104 for the first person with four expressions and 201-204 for the second person.I know that first i will change :
j=4;
k=2;
mydata = cell(j,k);
for e = 1:j
for p = 1:k
fname = sprintf('%d%02d.txt' , e, p);
fid = fopen(fname);
but i don't know how to change the '%d%02d.txt'. Anyone have an idea? Or does the changes in dimension representation can be done in only one file? I mean without creating another m file.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!