Re: display a matrix with a gray-scale graph



On Dec 2, 1:29 pm, "piglet " <piglet....@xxxxxxxxxxxxx> wrote:
Hi,

I am going to display a matrix with a gray-scale graph. For
example, a matrix A is defined as:
0.5 0.2 0.3
0.2 0.3 0.6
I need to draw a box with 2 rows and 3 columns, the
gray-scale of each cell is just the value of the element,
e.g., the gray-scale of the cell c(1,2) is the value of A(1,2).

-------------------
| |c(1,2)| |
-------------------
| | | |
-------------------

Is there anyone kindly giving me some suggestions? Many thanks!

A=[0.5, 0.2, 0.3; 0.2, 0.3, 0.6];
imshow(A,[])
would work by drawing your grayscale box, but the image would be very
small because each value is displayed as a single pixel.

A(1:100,1:100)=0.5;
A(1:100,101:200)=0.2;
A(1:100,201:300)=0.3;
A(101:200,1:100)=0.2;
A(101:200,101:200)=0.3;
A(101:200,201:300)=0.6;
imshow(A)

would displayit much larger.


Adam
.



Relevant Pages

  • Re: Grey level images
    ... If the display is for human observation, be advised that the human visual ... system's instantaneous dynamic range cannot perceive more than about 7-8 ... bits of gray-scale anyway... ...
    (sci.image.processing)
  • display a matrix with a gray-scale graph
    ... I am going to display a matrix with a gray-scale graph. ... I need to draw a box with 2 rows and 3 columns, ... e.g., the gray-scale of the cell cis the value of A. ...
    (comp.soft-sys.matlab)
  • Re: Display driver
    ... display driver. ... But if I want to use a monochrome display (256 gray-scale, 8bits), how ... drivers are using RGB color display. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: help collecting data.
    ... Dim GetC As String ... the code in the cell that I want the order numbers(info from column C ... "Otto Moehrbach" wrote: ... display them both, seperated by a comma ...
    (microsoft.public.excel.misc)
  • RE: Create a "cell button" to hide selected cells.
    ... What I'd like to do, however, is to select a range of columns to display so I ... Dim intPickMonth As Integer ... Create a ComboBox on Cell A1 ...
    (microsoft.public.excel.worksheet.functions)