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

Home » Public Forums » archive » Re: A problem using IDL?
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: A problem using IDL? [message #60100 is a reply to message #60099] Thu, 01 May 2008 07:49 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
If you want a meaningful plot of a sinusoidal function,
you should make sure that you have enough data
points (say, at least 10) in each cycle (period) of the function.
If this condition is not fulfilled, the plot will look strange.

Cheers,
Paolo

chih...@sohu.com wrote:
> I used idl to write the following:
>
> window,xsize=800,ysize=400
> min=0
> max=100
> n=200
> x=fltarr(n+1)
> for i=0,n do x[i]=min+double(i)*(max-min)/n
> print,x
> y=sin(2*3.141593*x)
> plot,x,y
>
> When n=100 or n=200,the graph is wrong. When n >=300,it's OK.Can
> someone tell me why?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: ProductLog function
Next Topic: idl array question

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

Current Time: Sun Oct 12 14:47:26 PDT 2025

Total time taken to generate the page: 1.52068 seconds