comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Can I do this without using loops?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Can I do this without using loops? [message #6441 is a reply to message #6323] Tue, 11 June 1996 00:00 Go to previous messageGo to previous message
Trygve Sparr is currently offline  Trygve Sparr
Messages: 1
Registered: June 1996
Junior Member
In Article<4pcm41$64r@vixen.cso.uiuc.edu>, <santanu@glibm5.cen.uiuc.edu>
writes:

> Q2) I have a generic array foo=fltarr(a,b). I'd like to copy findgen(b)
> into every column. Any way of doing this without loops ?
>

This one is not to difficult. Try:
foo = (fltarr(a) + 1.) # findgen(b)

If you want the rows findgened instead, you get:
foo = findgen(a) # (fltarr(b) + 1.)

Good luck!

--Trygve
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Searching for Constraint Optimization IDL Routine
Next Topic: Re: polar surfaces

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 06:25:25 PDT 2025

Total time taken to generate the page: 0.56589 seconds