Bill Allombert on Tue, 8 Oct 2002 12:30:47 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Vectors


On Tue, Oct 08, 2002 at 11:23:34AM +0100, Jon Perry wrote:
> How do you return a vector from a function without the trailing 0's?
> 
> I used:
> 
> x=vector(100)
> 
> but couldn't trim it (so I used lists instead).

Maybe you want to try the `vecextract' function ?
? vecextract(vector(100,i,i),"1..10")
%1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Cheers,
Bill