| prob. w/ subtracting scaler from an array [message #10253] |
Wed, 05 November 1997 00:00 |
demott
Messages: 8 Registered: June 1996
|
Junior Member |
|
|
hi, i've come across a very strange problem with IDL 5.0 and was
wondering if anyone can find what is hopefully an obvious mistake
that i'm overlooking. here's the scenaio:
IDL> print, raw(long,*,day)
-29.0149
-77.3963
102.775
60.1183
16.3703
-2.98194
-15.6764
34.1330
-11.8415
-23.0643
-1.89766
52.0201
31.2699
28.9157
31.2269
IDL> x = total(pwgtd(long,*,day),2)
IDL> print, x
9.79075
IDL> print, raw(long,*,day)- x
-38.8057
IDL> print, raw(long,*,day)- 5
-34.0149
-82.3963
97.7752
55.1183
11.3703
-7.98194
-20.6764
29.1330
-16.8415
-28.0643
-6.89766
47.0201
26.2699
23.9157
26.2269
i'm confused about why "raw(long,*,day) - x" returns a scalar (what
i want is the 1D array) while "raw(long,*,day) - 5" correctly returns
the 1D array. any ideas? thanks.
charlotte
|
|
|
|