plot parametric curves between xy-limits

I'm not sure if it's possible at all, but may be somebody knows the answer..
I have two parametric equations:
x=f(t)
y=g(t)
which describe some curve in XY plane. f(t) and g(t) are rational polynomial functions, i.e. the curve is an algebraic curve. The ezplot function of MATLAB allows to plot parametric curves for some values of parameter. Is it somehow possible to plot parametric curves for some values of x and y? Or we can only first find the plotting intervals of t by solving some inequalities, and then plot f(t) and g(t) on these intervals?
One solution could be implicitize the parametric curve (i.e. make it look like h(x,y)=0, thus eliminating t), but it is not easy to do in general case.
What is the best practical solution to my problem? I think that the problem is quite essential, and I'm not the only one who faces it.

댓글 수: 4

Star Strider
Star Strider 2014년 4월 22일
I am lost. The regular plot functions will allow you to plot y as a function of x, or both x and y as functions of t, all in the same plot if you want them to.
Ilya
Ilya 2014년 4월 22일
편집: Ilya 2014년 4월 22일
No, the question is not how to merely plot y=f(x), or y=f(t). The question is how to plot both x=f(t) and y=g(t) in XY plane with certain limits on x and y. This is called "parametric curve". By the way, xlim and ylim commands can only crop the plotting window, and this is also not what is needed, because in this case we still need to plot "the whole curve" and this may require a lot of unnecessary computations if the curve has a complex shape.
José-Luis
José-Luis 2014년 4월 22일
편집: José-Luis 2014년 4월 22일
Which xy plane? x = 3, y = 2? Something else? Note that even then you might get nothing or only a bunch of points in said plane. Or do you want a three-dimensional plot? In that case I recommend you look at plot3().
Or do you want to project everything to a single plane? Then it is just a matter of setting one of your dimensions to a scalar and using plot().
I am sorry but what you want is not clear to me.
Ilya
Ilya 2014년 4월 22일
편집: Ilya 2014년 4월 22일
I still try to clarify the thing by repeating only one small part of the question:
I have two parametric equations: x=f(t); y=g(t) which describe some curve in XY plane. I.e. two equation describe one curve, and this is called "parametric curve".
However, the question should seem clear to the users familiar with parametric curves and ezplot() function, which seems to allow setting limits on x and y for implicit curves f(x,y)=0, but not on parametric ones.
And, as I said, the solution may not exist in MATLAB or any other software.. I simply don't know, that's why I'm asking

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

제품

질문:

2014년 4월 22일

편집:

2014년 4월 22일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by