If statement "if column 1 == column 2 then keep row"

2 visualizaciones (últimos 30 días)
Chris H
Chris H el 9 de Oct. de 2019
Respondida: meghannmarie el 9 de Oct. de 2019
Just wondering what the best way to execute this.
eg Column A, Column B & Column C
I want a subset of data to show for all columns and only show the rows where column A == column B. I've been searching for an easy example to follow with no luck.
I think I can get this done with an If statement but not too sure.

Respuestas (1)

meghannmarie
meghannmarie el 9 de Oct. de 2019
Have you tried something like this?
subData = data(colA == colB);

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by