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!

 Réponse acceptée

Jan
Jan le 26 Mai 2021
Modifié(e) : Jan le 26 Mai 2021
YourCell = YourCell(cellfun('prodofsize', YourCell) == 1)
% or:
YourCell(cellfun('prodofsize', YourCell) > 1) = [];

2 commentaires

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Produits

Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by