update the filed values in a structure

1 visualización (últimos 30 días)
kittu
kittu el 21 de Oct. de 2012
Hi, i have a structure which has the number of field values depending on the blobs it identifies. But, in some the frames, i run my algorithm to identify hidden blobs. Now, i need to update the field of my structure with the values of newly found blobs. eg if i have a field named "Area" and i find that its values in a certain frame are 34,36,40,39 and in another frame i find that 34,36,79. This means that the 78 blob is combined with 2 blobs. So my algorithm separates the blobs but now i need to update my structure with the new values.
Any help would be highly appreciated.

Respuestas (1)

Wayne King
Wayne King el 21 de Oct. de 2012
Editada: Wayne King el 21 de Oct. de 2012
You can access the field with
mystruct.Area
So why can't you just update the field
mystruct = struct('Area',[34 36 40 39]);
mystruct.Area = [34 36 79];
If the problem is more involved than that, please include a small code example to illustrate the error.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by