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!

 Akzeptierte Antwort

Jan
Jan am 26 Mai 2021
Bearbeitet: Jan am 26 Mai 2021

1 Stimme

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

2 Kommentare

This worked perfectly!! I really appreciate your help!
Jan
Jan am 26 Mai 2021
You are welcome.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Produkte

Version

R2019a

Gefragt:

am 26 Mai 2021

Kommentiert:

Jan
am 26 Mai 2021

Community Treasure Hunt

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

Start Hunting!

Translated by