MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   如何在Matlab中可视化矩阵? (https://www.labfans.com/bbs/showthread.php?t=22478)

poster 2019-12-06 22:23

如何在Matlab中可视化矩阵?
 
我想从Matlab中的矩阵eta2创建这样的图像。像照片一样,所有颗粒必须具有不同的颜色,此外,下面的代码将计算eta2矩阵。要加载storeEtas,请使用链接[URL="https://drive.google.com/open?id=1rZlV79xMDr8y9z5SAV5cXE3iwpbqqAJZ"]m.file[/URL]

Nx=64; Ny=Nx; eta2 = zeros(64,64); load storeEtas for igrain=1:25 ncount=0; for i=1:64 for j=1:64 ii =(i-1)*Nx+j; eta2(i,j) =eta2(i,j)+etas(ii,igrain)^2; end end end figure imagesc(eta2); [URL="https://i.stack.imgur.com/M8SLs.jpg"][IMG]https://i.stack.imgur.com/M8SLs.jpg[/IMG][/URL]



[url=https://stackoverflow.com/q/59214750]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 05:16

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.