I am pulling values from a figure and it is a cell that has both numeric values and matrices. It is a 160 x 1 cell.
I want to remove the rows that contain a Matrix. For example my cell could look like the following:
1
2
1 x 4 matrix
3
4
after removal the cell should look like:
1
2
3
4
Any point in the right direction is greatly appreciated.
Thank you!

 채택된 답변

Jan
Jan 2021년 5월 26일
편집: Jan 2021년 5월 26일

1 개 추천

YourCell = YourCell(cellfun('prodofsize', YourCell) == 1)
% or:
YourCell(cellfun('prodofsize', YourCell) > 1) = [];

댓글 수: 2

This worked perfectly!! I really appreciate your help!
Jan
Jan 2021년 5월 26일
You are welcome.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2021년 5월 26일

댓글:

Jan
2021년 5월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by