how to find Y value in a parametric plot without cursor
2 ビュー (過去 30 日間)
古いコメントを表示
how do i find the value of Y at a specific X position, eg X=1
t= linspace (0,50,10000);
X= (3*t)+ (1/sin(t))
Y= -2*cos(t)
0 件のコメント
回答 (1 件)
Kian Azami
2017 年 10 月 6 日
To define the X matrix you need to put the "." before the "/" as below:
X= (3*t)+ (1./sin(t));
The Y is the function of t, so if you have the t you can find the value of Y easily.
But if you want to find a particular t so that X will have the value you want you can find the index of t first and then put that t inside the Y function and see the result. For example you want the X between 3 and 3.2, then you need to find the index of t that makes the X to be between 3 and 3.2. Then you put that t inside the Y and you find the value of Y.
idx = find(X >= 3 & X <= 3.2)
Y= -2*cos(t(idx));
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!