24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 499  |  回复: 4
当前主题已经存档。
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

xwz118

金虫 (正式写手)

[交流] [求助]求助用plotyy语句合成下面的例图

请教各位大侠,一般我们用matlab的plotyy语句把下面图合成一个图,具体要求如下:
   它们X轴相同,范围0.6:0.0001:7
         左边Y轴代表牵引力,单位是N
         右边Y轴代表的是总效率,0-1
两个分程序如下:
x=0.6:0.0001:7;
G=235000;
k=222186.2;
f=0.1;
fkp=(0.999*k*G+0.1094*f*k*G)./(0.1094*k+G*x)-G*f;
plot(x,fkp,'-b*')
hold on
title('行走系统牵引力理论特性曲线')
xlabel('潜孔钻机行走速度(km/h)')
ylabel('牵引力(N)')
grid on



v=0.6:0.0001:7;
delta_p=[8000000 15000000 25000000 35000000];
Cs=0.8e-9;
Csm=2.0e-9;
u=0.051;
n=2200;
Cv=0.2e+6;
Cvm=0.6e+6;
Cf=0.01;
Cfm=0.015;
Tc=5;
Vmax=45e-6;
nc=0.9;
rd=0.3223;
for i=1:1:length(delta_p)
for j=1:1:length(v)
    npv(i,j)=1-(1.07882*Cs)*(60*delta_p(i))/((u*n)*v(j));
    npt(i,j)=1/(1+(Cv*(u*n)/(60*delta_p(i)+Cf+(2*3.141592*Tc)/(delta_p(i)*Vmax))*(1.07882/v(j))));
    np(i,j)=npv(i,j)*npt(i,j);
    nmv(i,j)=1/(1+(Csm*delta_p(i))/(u*(v(j)/(0.377*rd*0.95))));
    nmt(i,j)=1-Cfm-(Cvm*(u*(v(j)/(0.377*rd*0.95))/delta_p(i)));
    nm(i,j)=nmv(i,j)*nmt(i,j);
    n1(i,j)=np(i,j)*nm(i,j)*nc;
end
end
figure(1)
plot(v,n1(1,,'-b')
hold on
plot(v,n1(2,,':r')
plot(v,n1(3,,'-.b')
plot(v,n1(4,,'--k')
title('泵—马达系统的理论效率分析')
xlabel('潜孔钻机行走速度(km/h)')
ylabel('总效率')
legend('8MPa','15MPa','25MPa','35MPa')
grid on
hold off

如何用plotyy语句把它们连起来,得出例题样子的图形

[ Last edited by xwz118 on 2009-3-31 at 22:03 ]
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

sunxiao

荣誉版主 (著名写手)

小木虫钓鱼协会会长


xwz118(金币+1,VIP+0):谢谢 3-31 17:14
给你个例子吧!
x=0:0.1*pi:2*pi
y=sin(x);
z=exp(x);
plotyy(x,y,x,z,'plot','semilogy'))
西南交大隧道方向招硕、博士
5楼2009-03-30 22:43:53
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 5 个回答

dnp

荣誉版主 (知名作家)

小木虫浪子

优秀版主

What would Jesus do?
2楼2009-03-30 16:38:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

xwz118

金虫 (正式写手)

这个我知道
怎么写呢?
3楼2009-03-30 16:46:56
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

abingchem

木虫 (著名写手)

★ ★
kuhailangyu(金币+1,VIP+0):xiexie 3-30 21:01
xwz118(金币+1,VIP+0):谢谢 3-31 17:13
help plotyy

PLOTYY Graphs with y tick labels on the left and right.
    PLOTYY(X1,Y1,X2,Y2) plots Y1 versus X1 with y-axis labeling
    on the left and plots Y2 versus X2 with y-axis labeling on
    the right.

    PLOTYY(X1,Y1,X2,Y2,FUN) uses the plotting function specified by
    the string FUN instead of PLOT to produce each plot.  FUN
    should be a plotting function like 'plot','semilogx','semilogy',
    'loglog','stem', etc. that accepts the syntax H = FUN(X,Y).

    PLOTYY(X1,Y1,X2,Y2,FUN1,FUN2) uses FUN1(X1,Y1) to plot the data for
    the left axes and FUN2(X1,Y1) to plot the data for the right axes.

    [AX,H1,H2] = PLOTYY(...) returns the handles of the two axes created in
    AX and the handles of the graphics objects from each plot in H1
    and H2. AX(1) is the left axes and AX(2) is the right axes.  

    See also PLOT.
冰是从最寒冷的那天开始融化的
4楼2009-03-30 18:58:43
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 一志愿西北农林畜牧专硕336分求调剂 +3 5ourr 2026-04-03 3/150 2026-04-05 10:40 by JOKER0401
[考研] 322求调剂:一志愿湖南大学 材料与化工(085600),已过六级。 +16 XX小邓 2026-03-29 18/900 2026-04-05 08:20 by gaoxiaoniuma
[考研] 302分求调剂 一志愿安徽大学085601 +5 zyx上岸! 2026-04-04 5/250 2026-04-05 07:50 by 544594351
[考研] 材料334求调剂 +15 Eecho# 2026-04-03 15/750 2026-04-04 23:05 by 无际的草原
[考研] 可跨专业调剂 +3 周的得地 2026-04-04 6/300 2026-04-04 22:21 by barlinike
[考研] 278求调剂 +14 范婷娜 2026-04-04 15/750 2026-04-04 22:15 by lqwchd
[考研] 求调剂 一志愿西南交通大学085701环境工程 282分 +5 多多爱吃汉堡 2026-04-04 5/250 2026-04-04 22:14 by 啵啵啵0119
[考研] 085400电子信息319求调剂(接受跨专业调剂) +5 星星不眨眼喽 2026-04-03 6/300 2026-04-04 21:50 by hemengdong
[考研] 309分085801求调剂 +11 MY_angel 2026-03-31 11/550 2026-04-04 19:11 by 蓝云思雨
[考研] 368求调剂 +5 今华习 2026-04-03 7/350 2026-04-04 18:47 by imissbao
[考研] 复试调剂 +6 范根培 2026-04-04 6/300 2026-04-04 14:27 by 土木硕士招生
[考研] 化学调剂求助 +6 LULONG1 2026-04-03 6/300 2026-04-03 23:13 by qzxyhcsy
[考研] 336求调剂 +8 kiyy 2026-04-01 8/400 2026-04-03 19:41 by lijunpoly
[考研] 303求调剂 +9 DLkz1314. 2026-03-30 9/450 2026-04-03 18:34 by ls刘帅
[考研] 266求调剂 +3 08电气工程 2026-04-03 3/150 2026-04-03 14:05 by 1753564080
[考研] 0703化学 +7 goldtt 2026-04-02 9/450 2026-04-03 09:36 by 蓝云思雨
[考研] 285求调剂 +8 AZMK 2026-04-02 11/550 2026-04-02 20:16 by yulian1987
[考研] 304求调剂 +12 素年祭语 2026-03-31 15/750 2026-04-01 22:41 by peike
[考研] 285求调剂 +11 AZMK 2026-04-01 11/550 2026-04-01 22:40 by peike
[考研] 370求调剂 +3 080700调剂 2026-03-30 3/150 2026-03-31 01:09 by A_Zhe
信息提示
请填处理意见