How to store multiple cell array in excel file

2 次查看(过去 30 天)
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 ?

采纳的回答

Walter Roberson
Walter Roberson 2015-12-1
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);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by