Matlab通过函数绘制等高线图fcontour 您所在的位置:网站首页 matlab等高线图标注 Matlab通过函数绘制等高线图fcontour

Matlab通过函数绘制等高线图fcontour

2023-11-17 18:24| 来源: 网络整理| 查看: 265

今天给各位带来关于Matlab绘制等高线图中的最后一篇系列文章,实用fcontour函数来绘制已知函数或方程的等高线图。本文主要讲解关于fcontour函数的常见用法、语法说明、绘制函数的等高线、指定绘图区间并绘制分段等高线图、更改线型和线宽、绘制多个函数的等高线图、创建后修改等高线图、填充等高线之间的区域、指定等高线的级别、控制等高线的分辨率以及添加标题和轴标签以及格式化刻度等。

Matlab通过函数绘制等高线图fcontour

下面,我们首先给出Matlab中关于fcontour函数的帮助文档如下:

>> help fcontour fcontour Plot function contour lines fcontour(F) plots contour lines of F(X,Y) over the axes size, with a default range of -5 < X < 5, -5 < Y < 5. fcontour(F,[XYMIN XYMAX]) plots over XYMIN < X < XYMAX, XYMIN < Y < XYMAX. fcontour(F,[XMIN XMAX YMIN YMAX]) plots over XMIN < X < XMAX, YMIN < Y < YMAX. H = fcontour(...) returns a handle to the function contour object created by fcontour. fcontour(...,'LineSpec') plots with the given line specification. fcontour(AX,...) plots into the axes AX instead of the current axes. Examples: fcontour(@(x,y) x.^2+y.^2) fcontour(@(x,y) sin(x).*cos(y),[-2*pi,2*pi],'MeshDensity',121)常见用法fcontour(f) fcontour(f,xyinterval) fcontour(___,LineSpec) fcontour(___,Name,Value) fcontour(ax,___) fc = fcontour(___)语法说明

fcontour(f) 根据 x 和 y 的默认区间 [-5 5] 和 z 的固定级别值绘制 z = f(x,y) 函数的等高线。

fcontour(f,xyinterval) 将在指定区间绘图。要对 x 和 y 使用相同的区间,请将 xyinterval 指定为 [min max] 形式的二元素向量。要使用不同的区间,请指定 [xmin xmax ymin ymax] 形式的四元素向量。

fcontour(___,LineSpec) 设置等高线的线型和颜色。例如,’-r’ 指定红色线条。在前面的任何输入参数组合之后使用此选项。

fcontour(___,Name,Value) 使用一个或多个名称-值对组参数指定线条属性。

fcontour(ax,___) 将图形绘制到 ax 指定的坐标区中,而不是当前坐标区中。

fc = fcontour(___) 返回 FunctionContour 对象。可使用 fc 查询和修改特定 FunctionContour 对象的属性。

绘制函数的等高线

在 −5



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有