Question about sets and cell array
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have a cell array :
B{1} = [0,1,2]
I want to now remove the zero. How do I do it?
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 6 de Sept. de 2013
Editada: Azzi Abdelmalek
el 6 de Sept. de 2013
B{1}(1)=[]
If you want to remove all zeros in B{1}
B{1}(B{1}==0)=[]
0 comentarios
Más respuestas (1)
Image Analyst
el 6 de Sept. de 2013
B{1} = [1,2];
If you want something more general, then say in what ways does it need to be general. Like, does it need to remove all zeros in B{1} only? Or does it need to remove all zeros in B{2}, B{3} and so on? The limited, very specific question you posted can be solved with my code.
0 comentarios
Ver también
Categorías
Más información sobre Multidimensional Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!