2018年8月25日
摘要:
v=20; t=[0:0.01*pi:50*pi]; alpha=pi/6; omega=pi/6; x=v*sin(alpha)*t.*cos(omega*t); y=v*sin(alpha)*t.*sin(omega*t); z=v*cos(alpha)*t; plot3(x,y,z,'r','linewidth',2) grid on 阅读全文
posted @ 2018-08-25 20:38
Airboy1
阅读(2574)
推荐(0)
编辑
摘要:
t=[0:0.5:25]; y=exp(-t/3)+sin(1+2*t); h=stem(t,y,'--'); set(get(h,'baseline'),'linestyle',':'); %把水平轴设置成: 的形状 set(h,'markerfacecolor','yellow'); hold on t2=[0:0.1:25]; y2=exp(-t2/3)+sin(1+2*t2); p... 阅读全文
posted @ 2018-08-25 20:16
Airboy1
阅读(563)
推荐(0)
编辑
摘要:
n=-2:0.2:2; [x,y,z]=peaks(n); %绘制peaks 三维曲线,并用 x y z 存储 [u,v]=gradient(z); %求各各点的在水平方向和竖直方向的梯度 quiver(x,y,u,v); %绘制矢量图 hold on contour(x,y,z,10) % 设置等高线的根数(画出来有n根等高线) 阅读全文
posted @ 2018-08-25 19:49
Airboy1
阅读(458)
推荐(0)
编辑
摘要:
%% pie(x,explode),explode 是一个与x同纬的矩阵,非0 时 使对应的部分突出 x=[1 2.5 1.8 3.6 2.4]; subplot(221);pie(x,1:5,{'Dep1','Dep2','Dep3','Dep4','Dep5'}); subplot(222);pie(x); subplot('Position',[0.2,0.05,0.6,0.45]); ... 阅读全文
posted @ 2018-08-25 19:30
Airboy1
阅读(340)
推荐(0)
编辑
摘要:
Y=cool(8); subplot(221);bar3(Y,'detached');title('Detached'); subplot(222);bar3(Y,'grouped');title('Grouped'); subplot(223);bar3(Y,'stacked');title('Stacked'); subplot(224);bar3(Y,0.3,'stacked');titl... 阅读全文
posted @ 2018-08-25 19:19
Airboy1
阅读(304)
推荐(0)
编辑
摘要:
%% bar bar3 竖直 bar( ,'style') group 默认,stack 堆叠 Income=[0.5,0.7,0.8;0.7,0.8,0.4;0.4,0.3,0.9;0.3,0.6,0.9;0.2,0.1,0.6]; subplot(221) bar(Income,'group');title('group') subplot(222) bar(Income,'stac... 阅读全文
posted @ 2018-08-25 16:55
Airboy1
阅读(221)
推荐(0)
编辑
摘要:
y=[2 ,4,5; 3,1,9; 5,3,5; 2,6,1] area(y) %第一列绘图;第一列加第二列绘图;第一列加第二列加第三列绘图; grid on colormap summer % 设置当前图层的颜色 set(gca,'layer','top') %将面积图的图层设置为最顶层 阅读全文
posted @ 2018-08-25 14:40
Airboy1
阅读(279)
推荐(0)
编辑
摘要:
%% ezplot 无需指定自变量的范围 syms t % 将 t 设置为符号变量 y=3/4*(exp(-2*t/3)*sin(1+2*t)); ezplot(y,[pi,3*pi]); 阅读全文
posted @ 2018-08-25 09:33
Airboy1
阅读(817)
推荐(0)
编辑
摘要:
axis([0 10 0 10]); hold on xy=[]; n=0; disp('Left mouse button picks points') disp('Right mouse button picks last point') but=1; while but==1 [xi,yi,but]=ginput(1); plot(xi,yi,'ro') n=n+... 阅读全文
posted @ 2018-08-25 09:15
Airboy1
阅读(186)
推荐(0)
编辑
摘要:
t=[0:0.1:25]; y1=exp(-t/3); y3=sin(2*t+3); y2=log(t+1); subplot(2,2,1) plot(t,y1,'linewidth',2) subplot(2,2,2) plot(t,y2,'linewidth',2) % subplot(2,2,[3,4]) % 可以这样设置 一张图占多张图的位置 subplot('position',... 阅读全文
posted @ 2018-08-25 08:29
Airboy1
阅读(4587)
推荐(0)
编辑
摘要:
%[AX,H1,H2]=plotyy(...):返回AX中创建的两个坐标轴的句柄以及H1和H2中每个图形绘图对象的句柄。AX(1)为左侧轴,AX(2)为右侧轴。 x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); y2 = 0.8*exp(-0.5*x).*sin(10*x); figure % new figure [hAx,hLine1,hLine... 阅读全文
posted @ 2018-08-25 08:14
Airboy1
阅读(388)
推荐(0)
编辑
|
|
|