how to add headers to a matrix?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
roshan varkey
il 1 Dic 2013
Commentato: Azzi Abdelmalek
il 1 Dic 2013
i have a matrix 10x10 of zeros under the name play_space......and i would like to name the rows A-J and columns 1-10,so the when i want to change some values in the matrix i will have to type in eg: play_space(B,3).
could someone please help?
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 1 Dic 2013
Why to use letters instead numbers?
A=rand(10)
A(2,3) % is simpler then using letters
3 Commenti
Azzi Abdelmalek
il 1 Dic 2013
Modificato: Azzi Abdelmalek
il 1 Dic 2013
X=rand(10)
A=1;
B=2;
C=3;
% and so on
X(A,3)
Azzi Abdelmalek
il 1 Dic 2013
If you want to work with letters
A=rand(10)
h='A':'J'
A1=@(s,j) A(strfind(h,s),j)
A1('B',3)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!