help-octave
[Top][All Lists]
Advanced

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

Re: turn off the colors in a matrix plot


From: Kamaraju S Kusumanchi
Subject: Re: turn off the colors in a matrix plot
Date: Tue, 15 Apr 2008 10:21:36 -0400
User-agent: KNode/0.10.4

address@hidden wrote:

> Quoting Kamaraju S Kusumanchi <address@hidden>:
> 
>> I have a matrix, say
>>
>> octave:94> f=[1 2 3 4; 0 1 2 3; -1 0 1 2]
>> f =
>>
>>    1   2   3   4
>>    0   1   2   3
>>   -1   0   1   2
>>
>> and I would like to plot this matrix as a surface using the row index and
>> column index as the x, y values. That is my points in the 3-D plot would
>> be
>>
>> (1,1, 1) (1,2,2) (1,3,3) (1,4,4)
>> (2,1, 0) (2,2,1) (2,3,2) (2,4,3)
>> (3,1,-1) (3,2,0) (3,3,1) (3,4,2)
>>
>> Currently I am doing this by
>>
>> octave:95> NX=3; NY=4; [yy, xx] = meshgrid([1:NY],[1:NX]), f=[1 2 3 4; 0
>> 1 2 3; -1 0 1 2], mesh(xx, yy, f), xlabel("x"), ylabel("y")
> 
> Can't you just do:
>    mesh (f)


Nope. The plots from mesh(f) and my commands are different. Try it out and
see for yourself.

-- 
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/



reply via email to

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