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
Function with something like [2:*] as input [message #87137] Thu, 09 January 2014 12:06 Go to previous message
andry is currently offline  andry
Messages: 7
Registered: March 2013
Junior Member
Hi,

Could anybody help on how I can write a function so that the input will be something like the indices of an array:

For example, my function would accept a call of this format:

a= my_function([1:3]) ; to say that it will process element 1 to 3 of an array
a= my_function([[1:*]) ; to say that it will process everything from element 1 to the end. This is because most of the time, I would not know how many data I have in some array.

My problem is that I can not see how I can read that input from within the function.

I am not sure this makes sense but it will facilitate the analysis of my data.

Thanks in advance for your help,

Andry
[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: Wed Oct 08 11:32:37 PDT 2025

Total time taken to generate the page: 0.00369 seconds