Mathematica绘制像素图——Image的用法

2024-11-03 07:00:35

1、Image[{{0.1,0.2,0.3},{0.4,0.5,0.6},{0.7,0.8,0.9}}]把数字矩阵转化为黑白的像素图。

Mathematica绘制像素图——Image的用法

3、给出一个三维随机矩阵:RandomReal[1,{8,10,3}]//MatrixForm

Mathematica绘制像素图——Image的用法

5、MatrixPlot[RandomReal[1,{8,10,3}]]是绘制不出图形来的,因为Mathematica不认为那是一个矩阵!下面的代码可以运行:MatrixPlot[RandomReal[1,{8,10}]

Mathematica绘制像素图——Image的用法
猜你喜欢