Help Creating a Cell Array for Excel
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I am very new to MatLab and am having trouble with what seems like very simple things. I have been tasked to modify an existing program that creates a Word document after presenting the user with images and buttons to rate the images. An Excel Document also needs to be created with a simplified version of these ratings, and this is what I am to modify into the existing program. All that needs to be on the Excel document is the partname and rating structures from within a cell structure that generates from the word document. So basically:
Partname1|Rating1
Partname2|Rating2
etc.
This is the code that I used to create what I have above, but only for the first 5 pictures:
xcelname=(fullfile(pwd,[fields{2,1} ' ' fields{3,1} ' Lube Coverage.xlsx'])) ;
A={[FileList(1,1).partname], [FileList(1,1).rating]; [FileList(2,1).partname], [FileList(2,1).rating]; [FileList(3,1).partname], [FileList(3,1).rating]; [FileList(4,1).partname], [FileList(4,1).rating]; [FileList(5,1).partname], [FileList(5,1).rating]};
xlswrite(xcelname, A);
I want to know if there is a more simple way to write the second line, as there are usually over 50 pictures included in one document. I understand there are probably loads of mistakes in the short code that I have listed, so please inform me of everything I am doing wrong.
All help is appreciated!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!