Path: news.mathworks.com!not-for-mail
From: "Alexander " <airkemp@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Using Array data to read in Images
Date: Sun, 19 Apr 2009 17:43:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <gsfnr6$5e9$1@fred.mathworks.com>
Reply-To: "Alexander " <airkemp@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1240162982 5577 172.30.248.37 (19 Apr 2009 17:43:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 19 Apr 2009 17:43:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1549321
Xref: news.mathworks.com comp.soft-sys.matlab:533879


Hi,

I have an array in matalb called IMAGESDATA, each cell in the array holds two values; name and path, so for example "IMAGESDATA(1,1).name" = doneB.jpg and "IMAGESDATA(1,2).path" = C:\....... The array holds the details for 4 images.
I want to read in each of the images in seperatly using their path and name in the IMAGESDATA array.
so along the lines of:

     function Getimages(handles)
     global IMAGESDATA;
          
     A = (imread ( IMAGESDATA(1,2) + IMAGESDATA(1,1) ));
     B = (imread ( IMAGESDATA(2,2) + IMAGESDATA2,1) ));
     C = (imread ( IMAGESDATA(3,2) + IMAGESDATA(3,1) ));
     D = (imread ( IMAGESDATA(4,2) + IMAGESDATA(5,1) ));

Is there anyway of doing this?, do i need to put it in a function?,  can anyone help?

Many Thanks

Alex