How to plot matrix to color band
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have such a matrix
X=[1, 2, 1, 3, 2, 1, 4, 2, 1, 3 ;...
2, 1, 1, 3, 6, 2, 4, 3, 2, 1;...
4, 1, 7, 2, 4, 3, 2, 4, 1, 2;...
2, 1, 5, 7, 5, 6, 7, 1, 2, 3];
And I want to plot it like this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1078185/image.png)
ofcourse with axis and colorbar
It is posible to do that?
0 Commenti
Risposta accettata
Abderrahim. B
il 26 Lug 2022
Modificato: Abderrahim. B
il 26 Lug 2022
X=[1, 2, 1, 3, 2, 1, 4, 2, 1, 3 ;...
2, 1, 1, 3, 6, 2, 4, 3, 2, 1;...
4, 1, 7, 2, 4, 3, 2, 4, 1, 2;...
2, 1, 5, 7, 5, 6, 7, 1, 2, 3];
heatmap(X, 'CellLabelColor', 'none')
colormap(flipud(gray))
colorbar
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots 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!