manipulating cells in array.

1 vue (au cours des 30 derniers jours)
sermet
sermet le 12 Mai 2014
Réponse apportée : Nitin le 12 Mai 2014
A=[ {'1'},{'1'},{'1'},{'1'},{'0'},{'1'},{'0'},{'1'}] %cell
A=A(:)
%I need to get rid of all zeros from A matrix then I wanna create A matrix again without zeros like that;
B=[ {'1'},{'1'},{'1'},{'1'},{'1'},{'1'}];
B=B(:)

Réponse acceptée

Nitin
Nitin le 12 Mai 2014
% One of the many solutions
t = ismember(A,'0')
A(t)=[];

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by