Filter löschen
Filter löschen

How to store multiple cell array in excel file

3 Ansichten (letzte 30 Tage)
Priyanka Roy
Priyanka Roy am 1 Dez. 2015
Kommentiert: Priyanka Roy am 1 Dez. 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 ?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 1 Dez. 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);

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