How can I change all fields in a structure except one?
Mostrar comentarios más antiguos
Hi!
I've got a structure with 17 fields and 68 values for each of them (so a 1x68 struct with 17 fields). Since some of the 68 values don't have information, I would like to fill them by copying the information of another value (which has information) which I can do simply like this:
mystruct(67) = mystruct(65);
But this copies all the fields of the 65th value of the structure into the fields of the 67th value of the structure, and I would like to keep the first field of the 67th value of the structure intact (because it's the name field). Any idea how I can do this?
Thanks very much in advance.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!