Re: Integer() operation on a sequence?

new topic     » goto parent     » topic index » view thread      » older message » newer message

> 
> Hmmm...I'll take your word for that, as I've never needed this 
> or similar functionalty yet. It strikes me as not necessary as
> what are you going to do with the resultant sequence? My guess is
> that you will examine each result element and do something appropriate. 
> In which case what is different between ...
> 
>   s = integers({2.3, 0, 5, 3.22, -4})
>   for i = 1 to length(s) do
>  
> -- 
> Derek Parnell
> Melbourne, Australia
> 
actually I'm imagining using it to find patterns in data;
vertical_length = 3000
reallybigsequence = {0,1,2,3,4,5,6,7,1,4,3,4,5,7,1,4,0,...and so on
pattern = {1,1,repeat(0,vertical_length/2),1,1,0}

for i = 1 to 7
m = find(pattern,integers(i/reallybigsequence)) 
if m then blah blah blah
end for

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu