全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
2602 5
2011-08-28
悬赏 5 个论坛币 未解决
单独运行下面的可以画出图来,但是合在一起想在同一图中画出两个函数就不能显示两个出来了,不知道问题出在哪里?谢谢!

syms x y
clf
ezplot((1/600+(129/50+36*(x-1)/25)*(1/360*(1/100+1/96)/(1/50+x/100)))/(4/150-1/96+(x-1)/100+1/600 ...
+(129/50+36*(x-1)/25)*((1/360*(1/100+1/96)/(1/50+x/100))+4/150-1/96+(x-1)/100)),[0,2])

syms x y
clf
ezplot(((129/50+36*(x-1)/25)*(4/150-1/96+(x-1)/100))/(4/150-1/96+(x-1)/100+1/600 ...
+(129/50+36*(x-1)/25)*((1/360*(1/100+1/96)/(1/50+x/100))+4/150-1/96+(x-1)/100)),[0,2])

合起来:
syms x
ezplot(((129/50+36*(x-1)/25)*(4/150-1/96+(x-1)/100))/(4/150-1/96+(x-1)/100+1/600 ...
+(129/50+36*(x-1)/25)*((1/360*(1/100+1/96)/(1/50+x/100))+4/150-1/96+(x-1)/100)),(1/600+(129/50+36*(x-1)/25)*(1/360*(1/100+1/96)/(1/50 ...
+x/100)))/(4/150-1/96+(x-1)/100+1/600 ...
+(129/50+36*(x-1)/25)*((1/360*(1/100+1/96)/(1/50+x/100))+4/150-1/96+(x-1)/100)),[0,2])


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-8-28 14:55:05
楼主可以看下ezplot函数ezplot(x,y)画出来的图形含义
ezplot(x,y) plots the parametrically defined planar curve x = x(t) and y = y(t) over the default domain 0 < t < 2pi
所以这样画出来的也是一个函数,并不是两个函数


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-8-28 15:10:08
谢谢楼上的,我刚学所以不懂。请教应如何才能画出两个函数呢?谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-8-28 15:24:36
定义y1=f(x),y2=f(x),分别对应你上面的两个函数,然后用plot命令
x=0:0.1:2
y1=f(x)    具体函数形式
y2=f(x)
plot(x,y1)
hold on
plot(x,y2)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-8-28 15:56:18
谢谢楼上回复。

x=0:0.1:2
y1=((129/50+36*(x-1)/25)*(4/150-1/96+(x-1)/100))/(4/150-1/96+(x-1)/100+1/600 ...
+(129/50+36*(x-1)/25)*((1/360*(1/100+1/96)/(1/50+x/100))+4/150-1/96+(x-1)/100))
y2=(1/600+(129/50+36*(x-1)/25)*(1/360*(1/100+1/96)/(1/50+x/100)))/(4/150-1/96+(x-1)/100+1/600 ...
+(129/50+36*(x-1)/25)*((1/360*(1/100+1/96)/(1/50+x/100))+4/150-1/96+(x-1)/100))
plot(x,y1)
hold on
plot(x,y2)

提示:??? Error using ==> mtimes
Inner matrix dimensions must agree.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-8-28 16:59:05
x=0:0.1:2;
y1=((129./50+36.*(x-1)./25).*(4./150-1./96+(x-1)./100))./(4./150-1./96+(x-1)./100+1./600 ...
+(129./50+36.*(x-1)./25).*((1./360.*(1./100+1./96)./(1./50+x./100))+4./150-1./96+(x-1)./100));
y2=(1./600+(129./50+36.*(x-1)./25).*(1./360.*(1./100+1./96)./(1./50+x./100)))./(4./150-1./96+(x-1)./100+1./600 ...
+(129./50+36.*(x-1)./25).*((1./360.*(1./100+1./96)./(1./50+x./100))+4./150-1./96+(x-1)./100));
plot(x,y1)
hold on
plot(x,y2)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群