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

Home » Public Forums » archive » Re: row calculation in a 2D array
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: row calculation in a 2D array [message #12601 is a reply to message #12591] Tue, 25 August 1998 00:00 Go to previous message
David Kastrup is currently offline  David Kastrup
Messages: 33
Registered: February 1998
Member
"Jonas" <jonas_2@hotmail.com> writes:

> Probably a damn simple one, but anyway:
>
> I want to perform the same operation on each sub-row in a 2D array.
> Say I want to calculate the mean of element 4-7 in each row of a 10x10
> array, and store the result in a 10 element-vector, where each element holds
> the mean from the respective row
>
> how is this done the smartest way, without using time-consuming loops?

mean = total(array[4:7,*],1)/4


--
David Kastrup Phone: +49-234-700-5570
Email: dak@neuroinformatik.ruhr-uni-bochum.de Fax: +49-234-709-4209
Institut f�r Neuroinformatik, Universit�tsstr. 150, 44780 Bochum, Germany
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What is going on with the minor ticks on log plots?????
Next Topic: Boundary Chain Code

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

Current Time: Tue Oct 21 16:05:02 PDT 2025

Total time taken to generate the page: 1.36332 seconds