Density plot in Matlab

折月煮酒 提交于 2019-12-02 11:44:57

Matlab is different than Mathematica in the sense of vectorized computations vs symbolic computation.

You could do what you'd like by defining a grid of spatial samples for x & y and then sample your function accordingly.

For example:

dx = 0.1;
dy = 0.1;
x = -50:dx:50;
y = -50:dy:50;
[xx, yy] = meshgrid(x,y);
imagesc(sin(xx.*yy/100));
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!