필터 지우기
필터 지우기

how to find Y value in a parametric plot without cursor

조회 수: 2 (최근 30일)
Joseph Lee
Joseph Lee 2017년 10월 6일
답변: Kian Azami 2017년 10월 6일
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)

답변 (1개)

Kian Azami
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));

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by