|
[Date Index]
[Thread Index]
[Author Index]
Re: DO if Loop
- To: mathgroup at smc.vnet.net
- Subject: [mg26648] Re: DO if Loop
- From: Ulrich Hofstoetter <ulrich.hofstoetter at visualanalysis.com>
- Date: Sat, 13 Jan 2001 22:36:22 -0500 (EST)
- Organization: Visual Analysis
- References: <93kk9f$6t3@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Bob Hallam wrote:
> Hello,
>
> I have a matrix function and a list of 2622 variables in groups of 3. I
> need to apply this function to each set of 3 variables continuing until
> finished with the list.
>
> How is this done?
>
> Best Regards,
>
> Bob
Partition[list,3] gives you a list of subsets with 3 elements, Map can apply
a function to each of these subsets and Flatten can recombine them.
But you still would have to handle the last elements of the list, as
Partition
discards all extra elements that cannot be put into subsets of 3 elements
Uli
--
Dipl.-Inf. Ulrich Hofstoetter
Visual Analysis GmbH
Neumarkter Str. 87
D - 81673 Munchen
Tel: (+49)89-431981-38
Fax: (+49)89-431981-1
e-mail: ulrich.hofstoetter at visualanalysis.com
www: http://www.visualanalysis.com
Prev by Date:
Re: Re: Random Sampling Without Replacement?
Next by Date:
Re: How can I transform the number of 123.456 into "123.456"?
Previous by thread:
Re: DO if Loop
Next by thread:
RE: DO if Loop
|