How do I remove empty indexes in a structure?
Mostrar comentarios más antiguos
I have a structure generated by the "regionprops" function for image processing.
I ran the following code to remove unwanted regions:
n = numel(stats);
for i=1:n
if stats(i).Area > 50
refinedStats(i,:) = stats(i);
end
end
This gives me a structure with the desired indexes, however the indexes of the ones I removed remain, just with their fields as [].
I was wondering how I remove these indexes from the structure?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Region and Image Properties en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!