How do i select a variable for global use from an array?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi all, i was wondering how i would take a value which is inside an array and assign a variable to it, for example
i have
D=struct('Coord',Coord','Con',Con','Re',Re','Load',Load','E',E','A',A');
in which all of the inputs are relatively large vectors I want to creat a global variable call A (area) by going into this array and selecting the A from it
I have tried A = D[A] but that does not work in MATLAB
Any ideas? thanks
0 comentarios
Respuestas (2)
James Tursa
el 26 de Feb. de 2011
A = D.A;
But why not just use D.A?
Ver también
Categorías
Más información sobre Variables 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!