Re: question about using array intrinsic functions
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Fri, 30 Jun 2006 19:59:49 +0000 (UTC)
In article <1151696861.234227.325110@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"PCAT" <pcatchen@xxxxxxxxx> writes:
HI,
I have an array a(i), i=1,3
I also have another array b(j,i), j=1,5, i=1,3
If I would like to compare the each element of a(i) with b(j,i), j=1,5.
For example
If i can find one set of b(j,i) from j=1, 5 that all corresponding
element of a(i) is less than b(j,i)
then I would like to do something further.
Then How can I use the "all " funciton in this case? Because the a and
b are not in the same dimension.
Thank you very much.
Do you mean something like this
program g
integer j, b(5,3), a(3)
a = (/2, 2, 3/)
b = 10
b(1,:) = 1
b(2,:) = 2
b(3,:) = 3
do j = 1, 5
if (all(b(j,:) < a)) then
print *, j
end if
end do
end program g
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- Follow-Ups:
- References:
- Prev by Date: question about using array intrinsic functions
- Next by Date: Re: EDITOR: Compaq Visual Fortran
- Previous by thread: question about using array intrinsic functions
- Next by thread: Re: question about using array intrinsic functions
- Index(es):
Relevant Pages
|