I have a 10 in 10 matrix. I want to plot the matrix in the way that each elements present the number. can you help me with that?

답변 (1개)

Star Strider
Star Strider 2020년 5월 2일

0 개 추천

I have no idea what result you want.
Try these:
M = randi(99, 10); % Create Matrix
[X,Y] = ndgrid(1:10);
figure
stem3(X(:), Y(:), M(:), 'filled')
grid on
figure
bar3(M)
grid on
.

댓글 수: 2

talayeh tavangar
talayeh tavangar 2020년 5월 2일
Thanks I mean I want to creat a surfaca and has 100 grids and each grid present the next one of the matrix element. I tried your code but it is 3D chart
My pleasure!
Still guessing what you want.
Try this:
figure
imagesc(M)
and this:
figure
surf(M)
view(0, 90)
.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

태그

질문:

2020년 5월 2일

댓글:

2020년 5월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by