How to display elements of Matrix by entering coordinates
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sahil Bajaj
il 29 Nov 2015
Risposto: Star Strider
il 29 Nov 2015
I want to display elements of a matrix by entering coordinates in the command window
Example:
1 0 0
0 1 0
0 0 1
if I enter disp(x(2,2));
I want to get 1
0 Commenti
Risposta accettata
Star Strider
il 29 Nov 2015
You have to assign the matrix to ‘x’ first:
x = [1 0 0
0 1 0
0 0 1];
disp(x(2,2))
1
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Resizing and Reshaping Matrices 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!