octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No bool matrices for imagesc in tip?


From: John W. Eaton
Subject: Re: No bool matrices for imagesc in tip?
Date: Thu, 22 Jan 2009 13:37:16 -0500

On  1-Nov-2008, Søren Hauberg wrote:

| lør, 01 11 2008 kl. 21:51 +0000, skrev Michael Goffioul:
| > On Sat, Nov 1, 2008 at 7:15 PM, Thomas Weber
| > <address@hidden> wrote:
| > > Am Samstag, den 01.11.2008, 10:14 +0000 schrieb Michael Goffioul:
| > >> My question was badly expressed. It should have been: does
| > >> Matlab accepts that you "set(img, 'cdata', m)", where img is
| > >> an image handle and m is a bool matrix?
| > >
| > >>> m = ones(10,10)>0;
| > >>> img = figure()
| > >>> set(img, 'cdata', m)
| > > ??? There is no 'cdata' property in the 'figure' class.
| > 
| > Indeed. As I mentioned, img should be an image handle, not
| > a figure handle.
| 
| The following code
| 
|   f = imshow (rand (50));
|   m = ones(50)>0;   
|   set(f, 'cdata', m) 
| 
| works just fine, and the resulting figure is a white image. Also,

This doesn't seem to work properly in Octave.  I'm seeing a black
image.  The data does appear to be stored properly as a logical array
in the cdata image property.  Would someone familiar with the image
functions take a look at this problem?

Thanks,

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]