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 件のコメント

John Valdez
John Valdez 2021 年 5 月 26 日
This worked perfectly!! I really appreciate your help!
Jan
Jan 2021 年 5 月 26 日
You are welcome.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品

リリース

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