MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [求助]ezplot画图 (https://www.labfans.com/bbs/showthread.php?t=6118)

剑八 2009-01-03 16:52

[求助]ezplot画图
 
想画 y=x^2
和 y=x^2+1
画在一起 用
ezplot('x^2','x^2+1')
却不行 请问问题出在哪里
怎么用ezplot 画
用hold on的可以
但这里不用

inmorning 2009-01-03 19:30

回复: [求助]ezplot画图
 
试试
ezplot('x^2');
hold on
ezplot('x^2+1');
hold on

snower1895 2009-01-03 22:34

回复: [求助]数字有效位数该如何改变?
 
[QUOTE=剑八;23122]想画 y=x^2
和 y=x^2+1
画在一起 用
ezplot('x^2','x^2+1')
却不行 请问问题出在哪里
怎么用ezplot 画
用hold on的可以
但这里不用[/QUOTE]

只能hold on
ezplot('x^2')
ezplot('x^2+1')

pseudocoder 2009-01-10 22:39

回复: [求助]ezplot画图
 
[QUOTE=剑八;23122]想画 y=x^2
和 y=x^2+1
画在一起 用
ezplot('x^2','x^2+1')
却不行 请问问题出在哪里
怎么用ezplot 画
用hold on的可以
但这里不用[/QUOTE]

MATLAB子带的帮助文档

EZPLOT(x,y) plots the parametrically defined planar curve x = x(t)
and y = y(t) over the default domain 0 < t < 2*pi.
EZPLOT(x,y, [tmin,tmax]) plots x = x(t) and y = y(t) over
tmin < t < tmax.

看不大懂,不过应该不是你想要的功能。。。
所以还是用hold on 吧

kingseawave2008 2009-02-18 17:49

回复: [求助]ezplot画图
 
你用ezplot('x^2','x^2+1')画出的图,其实等价于一下语句的结果:
syms X Y x
X=x^2;Y=x^2+1;
ezplot(X,Y)
即画出的第一个变量和第二个变量之间的关系,而非两个函数的图形的叠加。


所有时间均为北京时间。现在的时间是 13:13

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.