필터 지우기
필터 지우기

How to store multiple cell array in excel file

조회 수: 3 (최근 30일)
Priyanka Roy
Priyanka Roy 2015년 12월 1일
댓글: Priyanka Roy 2015년 12월 1일
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
Priyanka Roy
Priyanka Roy 2015년 12월 1일
Thanks for the answer . it is really helpful.

댓글을 달려면 로그인하십시오.

채택된 답변

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