help-octave
[Top][All Lists]
Advanced

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

hsv


From: Jose
Subject: hsv
Date: Tue, 15 Oct 2013 21:24:47 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Hello.

octave 3.6.4 here. Is hsv correct? Have a look
------------
octave:40> N=2
N =  2
octave:41> hsv(N)
ans =

   1   0   0
   1   0   0

octave:42> hsv2rgb ([linspace(0,1,N)', ones(N,2)])
ans =

   1   0   0
   1   0   0

-----------
but from
http://nf.nci.org.au/facilities/software/Matlab/techdoc
we can read that "hsv(m) is the same as hsv2rgb([h ones(m,2)]) where h is the linear ramp, h = (0:m-1)'/m."
-----------
octave:43> hsv2rgb ([linspace(0,1,N)'/N, ones(N,2)])
ans =

   1   0   0
   0   1   1
------------

BR
J.


reply via email to

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