Splitting an array
- From: "Leighton Facey" <tommygarth16k@xxxxxxxxxxx>
- Date: Thu, 7 Jun 2012 11:34:07 +0000 (UTC)
I am attempting to select certain numbers in an array and place them into two different array.
a=[0:1:100]'; for i=1:length(a)
if a(i)>20 a1(i)=a(i);
However, matlab in not doing this as a1 still the same size as 'a' and 'a2' is exactly what i want, why not the same with 'a1'?