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

Home » Public Forums » archive » Re: Newbie question concerning summations/loops in IDL
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: Newbie question concerning summations/loops in IDL [message #61736 is a reply to message #61735] Tue, 29 July 2008 19:27 Go to previous messageGo to previous message
Chris[6] is currently offline  Chris[6]
Messages: 84
Registered: July 2008
Member
On Jul 29, 1:12 pm, mbwel...@gmail.com wrote:
> Hello,
>
> I have need of some experienced users with sort of a newbie question.
>
> I am writing a code that needs a summation in it, this is what I have
> thus far:
>
> v=                              ; volume of region
> a=                              ; area of region
> o= 60*!pi/180           ; fault dip angle
> g=                              ; scaling factor
> t= 150                  ; elastic lithosphere thickness
> h=                              ; depth of faulting
>
> ind_small = where(thaext[1,*] lt t)
> ind_large = where(thaext[1,*] ge t)
> thaext_small = thaext[*,ind_small]
> thaext_large = thaext[*,ind_large]
>
> ens=(sin(o)*cos(o)/v)*                  ; horizonatal normal strain for small faults
> enl=(cos(o)/a)*                                 ; horizonatal normal strain for
> large faults
> evs=(-sin(o)*cos(o)/v)*                 ; vertical normal strain for small faults
> evl=(-cos(o)/a)*                                ; vertical normal strain for large faults
>
> The summation needs to be after * in the ens, enl, evs and evl
> fields.
> It must be of the form:
> summation N, i=0 [Di Li Hi] for small faults, where N = ind_small, Hi=
> T/sin(o)  and
> summation N, i=0 [Di Li] for large faults, where N=ind_large
>
> Could anyone provide any insight/guidance?
>
> Thanks,
> ~Matt

I don't know what some of your variables are (Li? Di?), but you might
want to look at TOTAL() to start- you can use that to do most
summation tasks.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: PSF Energy inside circle
Next Topic: Surface fitting image with missing data

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

Current Time: Sat Oct 11 22:25:15 PDT 2025

Total time taken to generate the page: 1.59378 seconds