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

Home » Public Forums » archive » How to work with scripts?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
How to work with scripts? [message #93946] Fri, 02 December 2016 12:26 Go to previous message
Edson Filho is currently offline  Edson Filho
Messages: 4
Registered: November 2016
Junior Member
Hey guys, I got a program that it ends up a little bit to big, so I'm trying in many ways to make it smaller, and now I'm trying to learn how to use scripts, for exemple, I have this:



nt = 112 ; Time 1 (mys)
nt2 = 81 ; Time 2 (mys)
T=(dindgen(nt)*0.1+1.); Mys
T2=(dindgen(nt2)+20);Mys
time=[T,T2] ; vector time

n=300000
R=6.*randomu(Seed,n, /Normal) + 8.

K= where(R gt 0.5 and R lt 18.5, count)
Np = count

P=fltarr(nt+nt2,Np)
P[0,*]=R[K]

Here is my period distribution, as I was wondering if I could put this as a script, just like

@Period

And Period.pro would be:
nt = 112
nt2 = 81
n=300000
R=6.*randomu(Seed,n, /Normal) + 8.

K= where(R gt 0.5 and R lt 18.5, count)
Np = count

P=fltarr(nt+nt2,Np)
P[0,*]=R[K]

Would that return all the variables to the program or I need to call them?
At this one, I need to return P and Np, is there somehow I do it?

Thanks guys!
[Message index]
 
Read Message
Read Message
Previous Topic: Comparing two float arrays upto 0.0001 precision
Next Topic: matlab compressed to idl

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

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

Total time taken to generate the page: 0.00434 seconds