a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar
From: Dr. Richard E. Hawkins (hawk_at_slytherin.ds.psu.edu)
Date: 05/28/04
- Next message: James Van Buskirk: "Re: Extracting submatrix from matrix"
- Previous message: Dr. Richard E. Hawkins: "Re: minloc type of behavior for logical arrays"
- Next in thread: James Van Buskirk: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: James Van Buskirk: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: Richard Maine: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: Paul Van Delst: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: Michael Metcalf: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 May 2004 18:49:45 +0000 (UTC)
I'm using minloc to find the earliest solved state (the longer horizon
makes it more reliable). However, this gives me a scalar of rank and
dimension 1, rather than a scalar:
print *,shape((states(minloc(states(0:mydepth,trialnextk)%m-1),trialnextk)%m))
yields 1, rather than 0, preventing me from assigning it to a scalar.
I can feed it to maxval() or some such, I suppose, to turn it scalar,
but this seems silly enough that I'm pretty sure I'm missing something
basic . . .
hawk
-- Richard E. Hawkins, Asst. Prof. of Economics /"\ ASCII ribbon campaign dochawk@psu.edu 111 Hiller (814) 375-4846 \ / against HTML mail These opinions will not be those of X and postings. Penn State until it pays my retainer. / \
- Next message: James Van Buskirk: "Re: Extracting submatrix from matrix"
- Previous message: Dr. Richard E. Hawkins: "Re: minloc type of behavior for logical arrays"
- Next in thread: James Van Buskirk: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: James Van Buskirk: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: Richard Maine: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: Paul Van Delst: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Reply: Michael Metcalf: "Re: a(minloc(a(0:b,c)%d-1),c)%d returns array, not scalar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|