[julia-users] Re: Array/tuple issues

2014-11-12 Thread Robert DJ
Thanks a lot - this really cleared some thing in my head! Using the dims argument as "dims..." had not occurred to me. Can you explain how the dots work (or point to reference)? I realized now that the part about the C matrix was oversimplified here, but now that I seem to have befriended the t

[julia-users] Re: Array/tuple issues

2014-11-11 Thread Steven G. Johnson
Seems like you answered your own questions?

[julia-users] Re: Array/tuple issues

2014-11-11 Thread David Gonzales
Reworked some of the construction to be more succint: function example(dims...) A = [zeros(2^l*[dims...]...) for l = 0:2] @show A J = [1 3 ; 2 4] I = kron(J, ones(Int,2,2)) K = rand(4) B = K[I] @show B C = zeros( dims... ) @show C nothing end