extract data from a matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, My matrix contains 200 X variables and 20 Z variables. All of them are properly named with a string name, i.e., X1...X200,Z1...Z20. How can I extract Zs out by using the string names, i.e. don't use column numbers. Many thanks.
1 Kommentar
David Sanchez
am 5 Aug. 2013
How/Where are you storing the name strings? Are they in an independent cell array?
Antworten (1)
Jan
am 5 Aug. 2013
Using "X1" to "X200" is a really bad idea, see FAQ: How to create A1, A2, ... in a loop. Such hiding of an index in a name of a variable demands for complicated methods for the creation and access without offering any benefit.
It is not clear how the variables are stored in your "matrix", because matrices cannot contain "names". Are you talking about a cell of structs? Please post a meaningful example in valid Matlab syntax. Please add the new information by editing the original question, where readers expect all required information, while neither adding a comment or pseudo-answer is useful.
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!