马铃薯
情节T.he symbolic expression 情节一种S.ymbolic expression or function in polar coordinates 情节T.he symbolic expressionFP.lot
。默认,FP.lot
你S.E.S.T.he rangeSyms.
ezpolar.
。默认,ezpolar.
在间隔中绘制符号表达或功能Syms.
作为象征性地绘制表达式的替代方案,您可以使用数字值替换符号变量subs
。然后,您可以使用这些数值在MATLAB™中具有绘图函数。
在以下表达式中你
一种NdV.
,替代符号变量X
一种Ndy
使用数字值定义mE.S.hgrid
。
Syms.X y你=罪(X^2 + y^2); v = cos(x*y); [X, Y] = meshgrid(-1:.1:1,-1:.1:1); U = subs(u, [x y], {X,Y}); V = subs(v, [x y], {X,Y});
现在,你可以绘制你
一种NdV.
通过使用S.T.一种Ndard MATLAB plotting functions.
创建由函数定义的矢量字段的图U(x,y)
一种NdV.(X,Y)
通过使用matlabquiver
功能。
quiver(X, Y, U, V)
通过顺序添加函数在一个图表上绘制若干函数。绘制第一个功能后,通过使用延续的功能保持on
命令。该保持on
命令保留现有的图。没有保持on
命令,每个新绘图都替换任何现有的绘图。之后保持on
命令,每个新图都显示在现有地块的顶部。通过使用使用的替换绘图的默认行为保持off
命令。
情节FP.lot
。Show the bounds ofDisplayName
返回的对象的属性FP.lot
。
Syms.
f =
obj = fplot(f,[0 3]);保持
通过将图形窗口划分为多个子图,在一个图中并排显示多个功能S.你bplot
。该command子图(m,n,p)
将数字划分为一个m
通过N
m一种T.R.一世Xof subplots and selects the subplotP.
。通过选择子图并使用绘图命令在单独的子图中显示多个绘图。绘制到多个子图中对于并排的图来说是有用的。
Compare plots ofS.你bplot
T.o create side-by-side subplots.
Syms.
通过使用MATLAB和符号数学工具箱功能在一起绘制相同图表上的数字和符号数据。
对于数字值 通过叠加正弦函数的曲线来显示点的底层结构。首先,使用S.catter
绘制点数x = linspace(-5,5);y = sin(x)+(-1)。^ randi(10,1,100)。* rand(1,100)./ 2;散射(x,y)
保持on
T.o retain the scatter plot. Then, useFP.lot
T.o plot the sine function.
保持
Combine symbolic and numeric plots in 3-D by using MATLAB and Symbolic Math Toolbox plotting functions. Symbolic Math Toolbox provides these 3-D plotting functions:
Create a spiral plot by usingfplot3.
绘制参数线
Syms.T. x =(1-t)* sin(100 * t);Y =(1-T)* COS(100 * T);z = sqrt(1 - x ^ 2 - y ^ 2);fplot3(x,y,z,[0 1])标题('Symbolic 3-D Parametric Line' )
用半径1和中心叠加一个球体图(0,0,0)。通过使用数值查找球体上的点S.P.here
。通过使用绘制球体mE.S.h
。该R.E.S.你lting plot shows the symbolic parametric line wrapped around the top hemisphere.
保持on [x,y,z] =球体;网格(x,y,z)colormap(灰色)标题('符号参数绘图和一个球体' )保持off