[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do you get rid of for-loops with arrays
- Subject: Re: How do you get rid of for-loops with arrays
- From: Andy Loughe <loughe(at)fsl.noaa.gov>
- Date: Wed, 08 Mar 2000 16:18:33 +0000
- Newsgroups: comp.lang.idl-pvwave
- Organization: National Oceanic and Atmospheric Administration, Boulder
- References: <38C67064.16E0BE4B@picker.fi>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:18837
Karri Kaksonen wrote:
>
> I have tried to understand how to use the arrays in IDL but
> there is still tons of techniques that I don't know...
>
> Is it possible to do this without for-loops?
>
> a = [[1,2,3],[4,5,6]]
> b = [2,2,3]
>
> for i=0,1 do a[*,i] = a[*,i] * b
>
> --
> Thanks,
>
> Karri
a = ( b # replicate(1,2) ) * a
--------
Andrew F. Loughe email:loughe@fsl.noaa.gov phone:(303)497-6211