change the value of a data structure field
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Trop Trader
el 6 de Abr. de 2024
it's possible to avoid loop? thank
class(app.Sis)
ans =
'struct'
Sis(1).Val
ans =
'l'
h=size(Sis,2);
for i=1:h
Sis(i).Val='kkk';
end
1 comentario
Respuesta aceptada
Fangjun Jiang
el 6 de Abr. de 2024
Editada: Fangjun Jiang
el 6 de Abr. de 2024
s(3).Val='1';
s.Val
[s.Val]=deal('2')
s.Val
0 comentarios
Más respuestas (0)
Ver también
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!