How to Plot a Matrix?

조회 수: 20 (최근 30일)
Nazi
Nazi 2013년 2월 5일
답변: eduardo ontiveros mosquera 2020년 1월 19일
Hello everyone,
I have a 31*31 matrix. Each element of this matrix has a value between 0 and 1.
I am trying to plot this matrix so that one axis of the graph shows the number of columns and the other one shows number of rows (This will make a grid with 31*31 squares). Now i want each of these squares to have a different color according to the value of the corresponding element in the matrix.
Can anyone help me with this please?
Thanks in advance.
PS: Final result will be something similar to this:
(In my case it will be 31*31 squares instead of 14*14 squares)

채택된 답변

Sean de Wolski
Sean de Wolski 2013년 2월 5일
imagesc(X);
or
pcolor(X);

추가 답변 (2개)

rahim qamar
rahim qamar 2020년 1월 11일
plot(1:10)

eduardo ontiveros mosquera
eduardo ontiveros mosquera 2020년 1월 19일
encuentre las expresiones para las coeficientes de la serie de furier que representa la forma de onda

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by