Have x find y
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I have one problem which i can't solve.
I have x = [...], y1=[...], y2=[..] And i have made plot in one graph. Now i want with specific X (is 230) find y1 and y2 on graph and write it out that i can know which value is y1 and y2 on this x.
Thanks in advance. Regards, Andrej
채택된 답변
Azzi Abdelmalek
2014년 1월 18일
x=0:0.1:10;
y1=cos(x);
y2=sin(x);
x1=2.234
y11=interp1(x,y1,x1)
Y21=interp1(x,y2,x1)
댓글 수: 0
추가 답변 (3개)
Image Analyst
2014년 1월 18일
You can use spline() or polyfit() to get the value at "in between" locations.
댓글 수: 1
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!