找回密码
 注册
关于网站域名变更的通知
查看: 549|回复: 1
打印 上一主题 下一主题

在Matlab中画流函数

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-4-29 10:45 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
Matlab算例:
, K; p* f5 ^. w6 w* P& oclear all;' |3 H, o' M- R1 L
clc;8 s1 s5 m! k: x* v& m2 R
%%
6 h9 ~& ?1 s4 \0 c$ W5 e8 R+ Ae = 2; g = 1;* X$ u2 U! O3 f
[x,y] = meshgrid(0:20,0:15);  % This makes regular grid6 C% n& ?9 c% C' C
u = e*x-g*y;                  % Linear velocity field% Q9 b" c1 p# q
v = g*x-e*y;
4 C' `: J5 A0 s1 O/ \  v6 o[phi,psi] = flowfun(u,v);  % Here comes the potential and streamfun.
, I& |& E% v& h2 _%
2 u9 \- a9 U4 C# e" [; scontour(phi,20,'--r','Displayname','phi')   % Contours of potential
' `: ~& H" K/ N0 d0 jhold on
0 `, Y3 r' q7 z8 _) o, `. N2 lcontour(psi,20,'-g','Displayname','psi')    % Contours of streamfunction
: j, s8 X. U7 Oquiver(x,y,u,v,'Displayname','velocity')         % Now superimpose the velocity field% Y' ~! v: ~& T
legend show;) p0 O$ Z+ ^4 y7 S3 W# i. [
0 \$ [& s; d5 h: x3 o$ X4 W

. y0 N7 {6 U3 @9 z! t5 T/ V
  • TA的每日心情

    2019-11-29 15:37
  • 签到天数: 1 天

    [LV.1]初来乍到

    2#
    发表于 2020-4-29 13:37 | 只看该作者
    在Matlab中画流函数
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    推荐内容上一条 /1 下一条

    EDA365公众号

    关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

    GMT+8, 2025-11-5 07:38 , Processed in 0.140625 second(s), 26 queries , Gzip On.

    深圳市墨知创新科技有限公司

    地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

    快速回复 返回顶部 返回列表