How to automatically pull values from matrix and set as variables
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Garrett
am 2 Aug. 2017
Bearbeitet: Stephen23
am 19 Jun. 2019
I have a matrix ex.
A=[11,7,3;9,13,5],
and I want to have a series of variables where
c1=1
c2=7
c3=3
c4=9
c5=13
c6=5.
How can I do an operation like this for any size matrix and note it is important that they are numbered in a certain direction. This is so in a later operation I can input c5 in an equation and it be the value located in A(2,2).
5 Kommentare
Akzeptierte Antwort
Akhilesh Thakur
am 2 Aug. 2017
https://stackoverflow.com/questions/14360501/extract-parts-of-a-big-matrix-and-allocate-them-in-new-variables-with-loop-funct
I guess this is what you are looking for Hope this helps.
4 Kommentare
Akhilesh Thakur
am 3 Aug. 2017
I guess still eval is used everywhere. Thanks for your comments on eval
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing 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!