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!

 Respuesta aceptada

Jan
Jan el 26 de Mayo de 2021
Editada: Jan el 26 de Mayo de 2021
YourCell = YourCell(cellfun('prodofsize', YourCell) == 1)
% or:
YourCell(cellfun('prodofsize', YourCell) > 1) = [];

2 comentarios

John Valdez
John Valdez el 26 de Mayo de 2021
This worked perfectly!! I really appreciate your help!
Jan
Jan el 26 de Mayo de 2021
You are welcome.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Versión

R2019a

Preguntada:

el 26 de Mayo de 2021

Comentada:

Jan
el 26 de Mayo de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by