How can I display a matrix as a figure?
111 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Abdullah Türk
le 28 Avr 2019
Commenté : Stephen Schoenefeldt
le 12 Déc 2023
Hello,
I have a 4x5 matrix. It is below:
a=
4 7 1 15 16
3 5 9 14 17
18 8 10 11 13
19 20 6 12 2
I want to display this matrix as a figure? How can I do this? Somebody says you can use same command suc as unitable or imagesc but I can't.
Thanks.
0 commentaires
Réponse acceptée
Adam Danz
le 28 Avr 2019
Modifié(e) : Adam Danz
le 29 Avr 2019
"Somebody says you can use same command such as uitable or imagesc but I can't."
This should get you started.
imagesc()
More info for imagesc(): https://www.mathworks.com/help/matlab/ref/imagesc.html
a=[
4 7 1 15 16
3 5 9 14 17
18 8 10 11 13
19 20 6 12 2];
figure()
imagesc(a)
uitable()
More info for uitable(): https://www.mathworks.com/help/matlab/ref/uitable.html#namevaluepairarguments
figure
uitable('Data', a)
1 commentaire
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!