manipulating cells in array.

2 visualizzazioni (ultimi 30 giorni)
sermet
sermet il 12 Mag 2014
Risposto: Nitin il 12 Mag 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(:)

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Signal Generation and Preprocessing in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by