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

Home » Public Forums » archive » Beginner: Oplot line t^(-5/3)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Beginner: Oplot line t^(-5/3) [message #82034] Mon, 12 November 2012 08:20
Charlie Paul D'auria is currently offline  Charlie Paul D'auria
Messages: 3
Registered: November 2012
Junior Member
Hi there!

Please bear in mind that I am a complete IDL beginner so excuse any foolishness!

I have managed to plot an XY graph with data plots.

My problem lies with my next stage: I need to generate a line of gradient t^(-5/3) (then use oplot over my data).

I get the error 'Attempt to subscript T with I is out of range.' and when I type print,line I only get one value for my line...

Here is some code I was provided with as a guide, which I have modified slightly:

line=dblarr(9999)
n=1E-4
t=dblarr(9999)

for i=0,9999 do begin
t(i)=i
line=n*t(i)^(-5./3.)
endfor

I have used 9999 as 1E+5 was apparently too large, or something..

Any help would be much appreciated!!

Charlie
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Help with the FOR loop
Next Topic: Re: Crashing ROI's

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

Current Time: Wed Oct 08 11:33:18 PDT 2025

Total time taken to generate the page: 0.00486 seconds