How to select a subset of an array in Fortran 90
- From: "Leonard W. Howell, Jr." <lwhowell@xxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 09:10:38 -0600
I'm trying to do the following but w/o any success:
I need a subroutine - call it SELECT - this is passed an array A, say of
dimension N, and I would like SELECT to return an array B of dimension M<=N
where B is a subset of A constructed according to some criteria. For
example, I might have
SUBROUTINE SELECT(A,N, RANGE, B, M)
and B could be the elements of A between Range(1) and Range(2).
I thought I could define B like
WHERE (A<=Range(2).AND.A >= Range(1))
B=A
Endwhere
I am having trouble with the variable dimension of B in the subroutine so
any help would be appreciated, Leonard
.
- Follow-Ups:
- Re: How to select a subset of an array in Fortran 90
- From: [JvO]
- Re: How to select a subset of an array in Fortran 90
- From: Michel OLAGNON
- Re: How to select a subset of an array in Fortran 90
- Prev by Date: Re: HELP ME, please
- Next by Date: Re: backslash-issues
- Previous by thread: HELP ME, please
- Next by thread: Re: How to select a subset of an array in Fortran 90
- Index(es):
Relevant Pages
|
|