Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
关于我的作业,我必须用数字标记的单元格绘制 10*10 网格。现在只有我开始学习 mat lab。我尝试了很多方法来绘制网格。但没有人给我解决方案。请帮帮我
这更像是一个 Matlab 问题。对于名为 G 的 2D 网格,您可以使用imagesc函数绘制它。
例子:
colormap(gray); imagesc(G, [-1 1]);
这里的colormap用于以灰度颜色绘制网格(-1个单元格显示为黑色,1个单元格显示为白色,]-1、1[之间的值显示为灰色)