赞
踩
多项式拟合的形式如下:
polyfit
,常用调用形式为
p=polyfit(x,y,n)
,
length(x)
)。
% 应用实例
plot([x1,x2],[y1,y2]);
。% plot([x1 x2],[y0 y2])
plot([5,15],[10,20],'r*-');
% axis([xmin xmax ymin ymax])
axis([0 20 0 25]) %限定二维坐标轴范围
title('A simple plot')
xlabel('x')%等价于 xlabel x
ylabel('y')%等价于 ylabel y
text(5,10,'M(5,15)','Color','blue','FontSize',14)
text(15,20,'N(15,20)','Color','blue','FontSize',14)
str = {{'A simple plot','from 1 to 10'},'2017-9-13'};
% text([x1 x2],[y0 y2],str);
t = text([6 10],[20 12],str);
t(1).Color = 'red';
t(1).FontSize = 14;

line
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。