필터 지우기
필터 지우기

How can i find a value?

조회 수: 1 (최근 30일)
Andreas Makrides
Andreas Makrides 2020년 10월 30일
댓글: Ameer Hamza 2020년 10월 30일
I have a x-y table that i insert from excel file The x has values that goes like 5m 10m.... 3000m And u want to find the y of a x value that it is not in the excel for example i want to find the y value of x=6m I have to make a line throught the closest point with 6( 5 and 10) then find the y=ax +b and then find the y value of 6 The program must does this procedure for any x value ( ps: the line y=ax+b between the closest points) Thankyou very much

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 10월 30일
x; % x-values from excel file
y; % y-values from excel file
xq = 6; % point at which you want to find y
yq = interp1(x, y, xq); % value of y
  댓글 수: 2
Andreas Makrides
Andreas Makrides 2020년 10월 30일
Thankyou very much
Ameer Hamza
Ameer Hamza 2020년 10월 30일
I am glad to be of help!!!

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by