How to filter field data in structure?

13 visualizaciones (últimos 30 días)
John Rivers
John Rivers el 12 de Jul. de 2015
Respondida: bio lim el 12 de Jul. de 2015
Hello. This is my first question. If my structure s has 3 fields f1 f2 f3. I want to filter f2 so that its value is less than 30. How to do that?

Respuesta aceptada

bio lim
bio lim el 12 de Jul. de 2015
a = arrayfun(@(n) s.f2 < 30, length(s.f2));
s = s(a);

Más respuestas (0)

Categorías

Más información sobre Floating-Point to Fixed-Point Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by