manipulating cells in array.

2 ビュー (過去 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 Center および File ExchangeSignal Generation and Preprocessing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by