[julia-users] Re: How to choose from the array to the new array only selected columns?

2014-04-29 Thread paul analyst
thanks, b = a[:;[1; 3; 5]] and b = a[:,[1, 3, 5]] woks too... What is the difference between "," and ";" Paul W dniu wtorek, 29 kwietnia 2014 20:34:44 UTC+2 użytkownik Patrick O'Leary napisał: > > b = a[:,[1; 3; 5]] > > or if they are always going to be evenly spaced indexes like that, you ca

[julia-users] Re: How to choose from the array to the new array only selected columns?

2014-04-29 Thread Patrick O'Leary
b = a[:,[1; 3; 5]] or if they are always going to be evenly spaced indexes like that, you can use a range: b = a[:, 1:2:5] On Tuesday, April 29, 2014 1:23:36 PM UTC-5, paul analyst wrote: > > a =rand(5,5) > b=slicedim(a,2,1,3,5) > ERROR: no method slicedim(Array{Float64,2}, Int64, Int64, Int64,