Help Creating a Cell Array for Excel

1 view (last 30 days)
Brian
Brian on 17 Jun 2014
Edited: Brian on 18 Jun 2014
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!

Answers (0)

Community Treasure Hunt

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

Start Hunting!