matlab等值线图怎么看

生活 2019-09-25 04:39:49 610

本文收集整理关于matlab等值线图怎么看的相关议题,使用内容导航快速到达。

内容导航:

  • Q1:有关用matlab做等值线图的~
  • Q2:如何用matlab画函数的等值线图?
  • Q3:用matlab画等值线图时,怎么使图中等值线标注数值上下对齐?
  • Q4:帮忙用matlab画等值线图
  • Q5:matlab绘制等值线图是,提示输入参数必须为实数是怎么回事呢。
  • Q6:matlab怎样对等值线图进行修饰,例如线粗细
  • Q7:用MATLAB画等值线图,如何不画0等值线
  • Q1:有关用matlab做等值线图的~

    用两个函数,一个是imagesc(data)另一个是contour画等值线图的函数

    Q2:如何用matlab画函数的等值线图?

    MATLAB
    提供了另一种基本的三维图形,即三维等值线图。这种图形通过函数contour3来绘制。
    例1:
    [x,y,z]=peaks(30);
    contour3(X,Y,Z,16);%用 16、种颜色
    grid,xlabel(
    ‘x-axis ‘),ylabel(
    ‘y-axis ‘),zlabel(
    ‘z-axis ‘);
    title( ‘
    CONTOUR3 of PEAKS ‘
    )
    例2:
    [X,Y,Z]=peaks(30);
    N=16;%等值线的数目和颜色
    clf%清除当前颜色
    view(3)%
    设置视角
    hold on%
    保持背景
    set(gca, ColorOrder ,hsv(N))
    %从 default hsv colormap 获得颜色
    contour3(X,Y,Z,N)
    %作出 N 条等值线
    grid,xlabel( X-axis ),ylabel( Y-axis
    ),zlabel( Z-axis )
    title( CONTOUR3 of PEAKS
    )
    hold off

    Q3:用matlab画等值线图时,怎么使图中等值线标注数值上下对齐?

    没办法,clabel里labelspacing属性可以调整标注的疏密,加入参数manual可以手动指定标注的位置。
    >> help clabel
    CLABEL Contour plot elevation labels.
    CLABEL(CS,H) adds height labels to the contour plot specified by H.
    The labels are rotated and inserted within the contour lines.CS and H
    are the contour matrix output and object handle outputs from CONTOUR,
    CONTOUR3, or CONTOURF.CLABEL(CS,H,V) labels just those contour levels given in
    vector V.The default action is to label all known contours.
    The label positions are selected randomly.CLABEL(CS,H,manual) places contour labels at the locations
    clicked on with a mouse.Pressing the return key terminates
    labeling.Use the space bar to enter contours and the arrow
    keys to move the crosshair if no mouse is available.CLABEL(CS) or CLABEL(CS,V) or CLABEL(CS,manual) places
    contour labels as above, except that the labels are drawn as
    plus signs on the contour with a nearby height value.H = CLABEL(...) returns handles to the TEXT (and possibly LINE)
    objects in H.The UserData property of the TEXT objects contain
    the height value for each label.CLABEL(...,text property,property_value,...) allows arbitrary
    TEXT property/value pairs to specified for the label strings.One special property (LabelSpacing) is also available to specify
    the spacing between labels (in points). This defaults to 144, or
    2 inches. Uses code by R. Pawlowicz to handle inline contour labels.Example
    subplot(1,3,1), [cs,h] = contour(peaks); clabel(cs,h,labelspacing,72)
    subplot(1,3,2), cs = contour(peaks); clabel(cs)
    subplot(1,3,3), [cs,h] = contour(peaks);
    clabel(cs,h,fontsize,15,color,r,rotation,0)See also contour, contour3, contourf.
    Reference page in Help browser
    doc clabel

    Q4:帮忙用matlab画等值线图

    clc;clear
    A=[...
    1 1 5.14
    1 2 9.56
    1 3 8.66
    2 1 12.55
    2 2 10.51
    2 3 2.7
    3 1 22.03
    3 2 22.97
    3 3 32.94
    4 2 55.58
    4 3 24.55];
    [x,y]=meshgrid(1:0.1:4,1:0.1:3);
    z=griddata(A(:,1),A(:,2),A(:,3),x,y,v4);
    subplot(1,2,1)%figure(1)
    meshc(x,y,z)
    subplot(1,2,2)%figure(2)
    [c,h] =contour(x,y,z);
    clabel(c,h)
    xlabel(x);ylabel(y)
    图形见我的博客:
    http://hi.baidu.com/chemical%5Fengineering/album/item/fddb5982f70f34860df4d2a8.html

    Q5:matlab绘制等值线图是,提示输入参数必须为实数是怎么回事呢。

    因为z(x,y)的数值中有复数存在,所以使用三维命令函数都会出现错误。

    Q6:matlab怎样对等值线图进行修饰,例如线粗细

    %[c,h]=contour(z);%画等值线图
    %[c,h]=contourf(z);并用颜色填充
    %hlabel=clabel(c,h);%表示图中线条上所标值的个数 h label
    %hclrbar=colorbar;%显示颜色筐
    %set(hclrbar,fontsize,20);%颜色筐的大小
    %set(gca,fontsize,20);%坐标系数的字体大小
    %set(hlabel(:),fontsize,20);%h标值的大小

    Q7:用MATLAB画等值线图,如何不画0等值线

    给你两个主要用法:
    contour(x,y,z,等值线条数)
    contour(x,y,z,[z1,z2,z3,z4,...])画指定值的等值线。
    你可以用第二个用法。强制输出特定的等值线。

    WwW.yIJITAo.c%Om

    相关文章
    matlab矩阵中添加一列2019-02-03
    matlab定义一个新函数2019-02-04
    matlab 编写m文件函数2019-02-19
    matlab编写函数m函数并计算2019-02-21
    matlab显示未定义函数2019-02-23
    matlab工作区不见了2019-03-19
    matlab矩阵生成灰度图2019-03-21
    matlab画三维图怎么除去复数2019-05-06
    matlab怎么运行程序2019-07-08
    在matlab中怎么计算其相位2020-05-27