- 积分
- 35
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-6-1
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
clc;
clear;
set(gcf,'Position',[225 230 550 420]); %设置图的边框的位置[左右移动 上下移动 左右伸缩 上下伸缩
rt=[1 1.4 1.6 2 2.4 2.6 3 3.6 4 4.6 5 6];
y=[0.264241 0.408167 0.475069 0.593994 0.691559 0.732615 0.800852 0.874311 0.908422 0.94371 0.959572 0.982649];
A=polyfit(rt,y,1)
z=polyval(A,rt);
% plot(rt,y,'k+',rt,z,'r');
plot(rt,y,'o','LineWidth',0.001,...
'MarkerEdgeColor','r',...
'MarkerFaceColor','r',...
'MarkerSize',1.5);
% plot(rt,y,'r.','MarkerSize',5);
hold on;
plot(rt,z,'b','LineWidth',1.5);
% axis equal;%等比例坐标轴
% axis([0 8 0 1.5]);
axis normal;%自动调整纵横轴比例,使当前坐标轴范围内的图形显示达到最佳效果
xlim([0 8]);
ylim([0 1.5]);
set(gca,'XTick',0:1:8)
set(gca,'YTick',0:0.3:1.5)
title(['波速比=',num2str(A(1))],'color','k','FontSize',12);
xlabel('Vp');
ylabel('Vs');
% txt=['s' 's'];
% text(2,1.2,txt, 'color','k','FontSize',14);
set(gca,'FontSize',13);
set(get(gca,'XLabel'),'Fontsize',13)
set(get(gca,'YLabel'),'Fontsize',13)
xx=0;
|
|