Effacer les filtres
Effacer les filtres

How to store multiple cell array in excel file

3 vues (au cours des 30 derniers jours)
Priyanka Roy
Priyanka Roy le 1 Déc 2015
Commenté : Priyanka Roy le 1 Déc 2015
Im having an image folder with 30 images .
I am using this code:
srcFiles = dir('image folder\*.jpg');
to store all images in an array.
To read all image files in a for loop simultaneously, im using the below code :
for i = 1 : length(srcFiles)
length(srcFiles)
filename = strcat('image folder\',srcFiles(i).name);
I{i} = imread(filename);
Then some execution done and modified image is generated.
some comparative features are calculated then. like :
MyPsnr = psnrIM( MyIM,I );
MyCorr = corr2(MyIM, I) ;
Then store all the features in a cell array.
MyFeature = [ MyPsnr, MyCorr, timeMy];
The problem is :
To save the cell array in an excel file im using the code:
xlswrite('folder\name.xlsx', MyFeature);
it is storing only 1 image features.
How could i save all 30 image features in a single excel file ?
  1 commentaire
Priyanka Roy
Priyanka Roy le 1 Déc 2015
Thanks for the answer . it is really helpful.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 1 Déc 2015
In the loop
MyFeature{i,1} = MyPsnr;
MyFeature{i,2} = MyCorr;
MyFeature{i,3} = timeMy;
And do not write the xls file inside the loop: write it once outside the loop using that same syntax
xlswrite('folder\name.xlsx', MyFeature);

Plus de réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by