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 #12591 is a reply to message #12587] Tue, 25 August 1998 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Jonas wrote:
>
> thanxalot (both Kevin and David), it helped. I wasn't avare of the function
> "TOTAL", still being a newbie and all.
>
> This was kind of a special example since total could do all the work. What
> if I would like to do another calculation where total is not applicable...
> in other words:
> is there generally an easy way to perform the same calculation over all the
> (sub-)rows in a in a 2D array?
>
> I do not have such a problem at the moment, but I assume it is likely that I
> will encounter it in the future (at least if i don't ask now :-)).
>
> sincerely
> Jonas Svensson

Well, if you want to compute averages first over rows 0:3, then 4:7,
then 8:11, etc. you may not get around using a loop. Although, in some
cases you could try your luck with reform() and a subsequent call to
Kevin's average routine (which I like very much: THANKS!). But this is
certainly prone to errors...

Martin.



--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
[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: Thu Oct 16 21:13:14 PDT 2025

Total time taken to generate the page: 2.48018 seconds