manipulating cells in array.

조회 수: 1 (최근 30일)
sermet
sermet 2014년 5월 12일
답변: Nitin 2014년 5월 12일
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(:)

채택된 답변

Nitin
Nitin 2014년 5월 12일
% One of the many solutions
t = ismember(A,'0')
A(t)=[];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Generation and Preprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by