You can achieve this with filter: 
http://docs.julialang.org/en/release-0.3/stdlib/collections/?highlight=filter#Base.filter


Am Mittwoch, 18. März 2015 12:31:57 UTC+1 schrieb [email protected]:
>
> Hi
> I want to fill an array based on a condition - eg
>
> a = []
> z = [1,2,3,4]
>
> for i = 1:length(z)
> if i > 2               
> continue
> end
> end
>
> so, I would now like to see the values 1 & 2 in  my array "a"
> Regards
>
>
>
>
>

Reply via email to