• matlab迅雷下载 > Math 241H, section 0101, Fall 2005 Matlab 4 Matlab is very good at ...
  • Math 241H, section 0101, Fall 2005 Matlab 4 Matlab is very good at ...

    免费下载 下载该文档 文档格式:PDF   更新时间:2011-11-01   下载次数:0   点击次数:1
    文档基本属性
    文档格式:PDF
    文档标题:Math 241H, section 0101, Fall 2005 Matlab 4 Matlab is very good at plotting vector fields both in two and three di- mensions. Ad
    文档作者:
    关键词:
    主题:
    单位:
    文档创建者:TeX
    创建时间:
    上次保存时间:
    修订:pdfTeX-1.10b
    点击这里显示更多文档属性
    Page 1
    Math 241H, section 0101, Fall 2005 Matlab 4 Matlab is very good at plotting vector fields both in two and three di- mensions. Additionally, using vector fields it can be easy to approximate divergence and curl for certain points, and to see the sign of a line integral. The quiver command easily displays vector fields in two dimensions. Suppose the vector field is given by F(x, y) = u(x, y)i + v(x, y)j. The func- tions u and v can be written as mfiles or inline. We then need to con- struct a mesh [X, Y ] as done before and finally the command is given by quiver(X,Y,u(X, Y ),v(X, Y )). One warning is to not make the mesh too fine, put on too many arrows, about 5-20 divisions in each direction is a good rule of thumb. Suppose F(x, y) = xi + (x2 + y2)j over the rectangle [?2,2] × [?2,2]. To have matlab plot the vector field enter the following: >> u=inline(’x’,’x’,’y’) >> v=inline(’x.^2 + y.^2’,’x’,’y’) >> x=linspace(-2,2,11); >> y=linspace(-2,2,11); >> [X,Y]=meshgrid(x,y); >> U=u(X,Y); V=v(X,Y); >> quiver (X,Y,U,V) >> axis image (this last command sets the tick marks) Sometimes we want to see a unit vector field. To adjust the vector field we make sure that each vector is a unit. To do this enter the the following in place of the last three lines above. >> U1=U./sqrt(U.^2 + V.^2); V1=V./sqrt(U.^2 + V.^2); >> quiver (X,Y,U1,V1) >> axis image To graph a vector field in three dimensions use the command quiver3. For instance, to graph the vector field F(x, y, z) = yi+xj+(x2 +z)k over the

    下一页

  • 下载地址 (推荐使用迅雷下载地址,速度快,支持断点续传)
  • 免费下载 PDF格式下载
  • 您可能感兴趣的
  • matlab7.0迅雷下载  迅雷7官方下载  迅雷看看高清电影下载  迅雷7官方下载正式版  迅雷高清影视免费下载  迅雷下载官方下载  迅雷下载穿越火线2011  迅雷mv免费下载高清  迅雷mp4电影下载网