plotting a matrix in matlab
显示 更早的评论
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
2020-5-2
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
2020-5-2
Star Strider
2020-5-2
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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!