by Ted Edwards <Ted_Espamless@[EMAIL PROTECTED]
>
Dec 17, 2007 at 06:24 PM
Lance wrote:
> Say you have a 100 element vector. You want to take that vector and
> duplicate it, say 20 times such that you get a 100 20 matrix where all
> 20 columns are identical. I know that you can just do:
>
> {transpose}20 100{rho}vector.
>
> I'm looking for other ways to accomplish the same thing in APL. Can
> you use an outer product or some other form of assignment?
Vn{<-}{iota}1E4
Vc{<-}1E4{rho}'abc'
Left argument of TIMER repeats test L times and divides total by L
100 TIMER'Vn{nul}.+20{rho}0' {@[EMAIL PROTECTED]
for numeric Vn
0.00373
100 TIMER'{transpose}20 1E4{rho}Vc' {@[EMAIL PROTECTED]
for character Vc
0.00045
for any V
10 TIMER'20/,[{iota}0]Vn'
0.0162
10 TIMER'20/,[{iota}0]Vc'
0.016
or
10 TIMER'{disclose}[1]20{rho}{enclose}Vn'
0.0182
10 TIMER'{disclose}[1]20{rho}{enclose}Vc'
0.0193
Ted