A=rand(4,4); A[:,vec(A[1,:].>0.7)]

--Tim

On Sunday, March 29, 2015 12:07:10 PM Andreas ten Pas wrote:
> How can we do the following *Matlab* code in *Julia*?
> 
> A=rand(4); A(:,A(1,:)>0.7)
> 
> I've tried this in *Julia*:
> 
> A=rand(4,4); A[:,A[1,:].>0.7]
> 
> And how would we combine multiple *boolean comparisons* in the indexing such
> as *A(:,A(1,:)>0.7 & A(1,:)<0.9)*?

Reply via email to