splitting a array at defined interval
Mostrar comentarios más antiguos
I have a array c of 276 elements. I want to split it into 3 separate array. The number of elements in each of these three array is within the array c itself.
vind=c(find(c>=10)) %gives me
vind =
45 45 183
I have to split the array c into three arrays with number of elements as 45, 45 and 183 respectively excluding the position of these three numbers. Pls suggest how it can be done.
with thanks
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 9 de Abr. de 2013
ii=1;
for k=1:numel(vind)
jj=vind(k)
out{k}=c(ii:jj)
ii=jj+1;
end
1 comentario
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!