comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: contour error..
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: contour error.. [message #47839 is a reply to message #47827] Thu, 02 March 2006 16:21 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <1141344670.948209.136460@j33g2000cwa.googlegroups.com>,
pimpk24@hotmail.com wrote:

> I get this pesky error: "v array must have 2 dimensions" when trying to
> do a simple call to contour

> V= -( ( -C* cos(C * z)/C) / (C/C) ) * exp(-abs(x)/C)
> contour, v, x, z

You need to make x and z 2-D, like this:

x1= -15000.0
x2 = 15000.0
dx = 100.0
nx= floor((x2- x1)/dx)
x= lindgen(nx) * dx + x1

z1=0.0
z2=14000.0
dz=100.0
nz=floor((z2-z1)/dz) + 1L
z =lindgen(nz)*dz + z1

xx = REBIN(x, nx, nz)
zz = REBIN(REFORM(z, 1, nz), nx, nz)

V= -cos(zz/z2)*exp(-abs(xx/x1))

contour, v, x, z


I had to scale zz and xx in order to make something reasonable to plot.

Ken Bowman
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Plot setting in order to get the graphs similar to SuperMongo outputs
Next Topic: All iTools have my UI Panels

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Apr 27 12:04:01 PDT 2026

Total time taken to generate the page: 2.39768 seconds