If you have the image3 addon, you can do it by hand with
raster arrays:
load '~addons\media\image3\view_m.ijs'
banana=: 4 : '(100*(x-y^2)^2)+(1-x)^2'
d =: banana"0 _"_ 0 ~1.5*(i.%<:) 400
p8=: Hue (i.%]) 8
view_image p8;d (+/ . >:)"0 _]10 8 6 4 2 0.5 0.1
400 400
(you probably want a transpose reverse of d, but this is
the basic data manipulation)
Best, Cliff
kamakura wrote:
Dear all;
I want to make a contour plot for the Rosenbrock's banana function.
However, I cannot draw it without contour levels like
levels=(10,8,6,4,2,0.5,0.1). Is it possible to specify the levels of the
contour?
banana=: 4 : '(100*(x-y^2)^2)+(1-x)^2'
'contour' plot 0 1.5 100; 0 1.5 100; 'banana'
Best regards.
Toshinari Kamakura
+++++++++++++++++++++++++++++
Toshinari Kamakura
Chuo University
1-13-27 Kasuga
Bunkyo-ku
Tokyo 112-8551, Japan
++++++++++++++++++++++++++++++
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
Clifford A. Reiter
Mathematics Department, Lafayette College
Easton, PA 18042 USA, 610-330-5277
http://www.lafayette.edu/~reiterc
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm