필터 지우기
필터 지우기

Remove numbers from a cell array of length n = 10963

조회 수: 1 (최근 30일)
FRANCISCO
FRANCISCO 2013년 12월 11일
댓글: FRANCISCO 2013년 12월 11일
As I can remove numbers from a cell array?
I have a cell of 10693 rows and 1 column. Each of these rows contains another array containing numbers and I want to delete the numbers (-1). As I can do that with a loop? thank you very much

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 12월 11일
편집: Azzi Abdelmalek 2013년 12월 11일
If A is your array
A={1:3 -1:5}
out=cellfun(@(x) x(x~=-1), A,'un',0)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by