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

Home » Public Forums » archive » Function with something like [2:*] as input
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: Function with something like [2:*] as input [message #87138 is a reply to message #87137] Thu, 09 January 2014 12:57 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
Here is one way to do it. Create the function below, then

IDL> array = findgen(20)
IDL> print, SubArray(array, 1, 3)
IDL> print, SubArray(array, 1, N_Elements(array)-1)
IDL> print, SubArray(array, 1, -1)


function SubArray, array, index1, index2
return, array[index1:index2]
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Download files from the web
Next Topic: NITER in MPFITFUN

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

Current Time: Sat Oct 11 03:25:17 PDT 2025

Total time taken to generate the page: 0.64211 seconds