knowledge-database (beta)

Current group: comp.soft-sys.matlab

imshow?GUI problem...

imshow?GUI problem...  
bk
 Re: imshow?GUI problem...  
Jérôme
From:bk
Subject:imshow?GUI problem...
Date:Sun, 23 Jan 2005 13:28:41 -0500
hi all
i am trying to run a FOR loop in a GUI whereby i will select some
images in a listbox and they are to be displayed in the axes when the
for loop is running.

here are my codes
index_selected = get(handles.listbox1,'Value');
[rows cols]=size(index_selected);

for i=1:cols
file_list = get(handles.listbox1,'String');
file_list
filename = file_list(index_selected(i)); % Item selected in list
box
filename
axes(handles.axes1);
imshow(filename)
end


however, the program had problem when executing the
"imshow(filename)" part..
with the error message
"Warning: Displaying real part of complex input", and
"??? Function 'real' is not defined for values of class 'cell'."

can anyone pls tell me why?thanks!!

bk
From:Jérôme
Subject:Re: imshow?GUI problem...
Date:Mon, 24 Jan 2005 02:59:47 -0500
Hi,

I think file_list is a cell array of string. Am I right ?

So try :

filename = file_list{index_selected(i)};

Jérôme
   

Copyright © 2006 knowledge-database   -   All rights reserved