[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: Array multiplication: implicit loop query*From*: Richard Younger <younger(at)ll.mit.edu>*Date*: Fri, 10 Aug 2001 11:09:46 -0400*Newsgroups*: comp.lang.idl-pvwave*Organization*: MIT Lincoln Laboratory*References*: <d90c0773.0108100256.6398a693@posting.google.com> <269b6343.0108100453.55bcb965@posting.google.com>*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:26139

"Bill B." wrote: > > george@apg.ph.ucl.ac.uk (george Millward) wrote in message > > It > > would seem that, to get this to work I need to make > > Pres=fltarr(30,91,40). > > Yes. > > IDL> a = indgen(20,20) > IDL> b = indgen(20) > IDL> c = b * a > IDL> help, c > C INT = Array[20] > > I believe you need to REPLICATE 'Pres' as needed. > > -Bill B. I've been converted to REBIN, myself. (see the group archives for the dimensional juggling tutorial by JD Smith this past spring) IDL> Pres_expan = REBIN(Pres, 30, 91, 40) IDL> help, Pres_expan PRES_EXPAN FLOAT = Array[30, 91, 40] This gives you the correct dimensions and avoids loops. You can even resize inline if you dislike having the extra variable around: DEN_H = MMR_H * REBIN(Pres, 30, 91, 40) * RMT / $ ( atomic_mass_H * Gas_constant * TN ) Good luck, Rich Younger

**Follow-Ups**:**Re: Array multiplication: implicit loop query***From:*george Millward

**References**:**Array multiplication: implicit loop query***From:*george Millward

**Re: Array multiplication: implicit loop query***From:*Bill B.

- Prev by Date:
**Re: Array multiplication: implicit loop query** - Next by Date:
**Re: Cartesian IDLgrSurface of [theta,phi] data to a sphere??** - Prev by thread:
**Re: Array multiplication: implicit loop query** - Next by thread:
**Re: Array multiplication: implicit loop query** - Index(es):