用Mathematica绘制流量图(StreamPlot)

 时间:2026-02-14 14:15:52

1、绘制{y,-x}场里面的流线。

StreamPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}]

这个图看起来就像是一组同心圆。

用Mathematica绘制流量图(StreamPlot)

2、增加流线的长度和箭头的大小。

StreamPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}, StreamScale -> 0.16]

用Mathematica绘制流量图(StreamPlot)

3、每一圈用一个箭头:

StreamPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}, StreamScale -> Full]

用Mathematica绘制流量图(StreamPlot)

4、绘制流量密度图:

StreamDensityPlot[{y, -x}, {x, -3, 3}, {y, -3, 3}, 

 StreamStyle -> White, FrameStyle -> Blue, Background -> Pink, 

 ColorFunction -> Hue]

用Mathematica绘制流量图(StreamPlot)

5、用Cos[x y]作为着色方案:

StreamDensityPlot[{{y, -x}, Cos[x y]}, {x, -3, 3}, {y, -3, 3}, 

 MaxRecursion -> 2, ColorFunction -> Hue, StreamStyle -> White]

6、StreamPlot的本质,可以通过下面的方法,进行查看:

a = StreamPlot[{{x, y}, {y, -x}}, {x, -3, 3}, {y, -3, 3}]

a[[1]]

用Mathematica绘制流量图(StreamPlot)

7、用Graphics画出这个流量图:

Graphics[a[[1]]

用Mathematica绘制流量图(StreamPlot)

  • MATLAB图像增强处理:灰度变换直方图均衡匹配
  • 如何用MATLAB实现快速傅立叶变换FFT?
  • 【MATLAB】运行M文件
  • matlab find用法
  • MATLAB如何画等高线图
  • 热门搜索
    车险怎么买划算 亲人去世怎么安慰 直径怎么算 怎么戒烟最有效 安卓手机怎么截屏 网上怎么预约挂号 怎么给图片加水印 月经不调怎么办 螃蟹怎么做好吃又简单 肺纤维化是怎么回事