2023年9月2日 星期六

線性內插法計算方式(linear interpolation)



Google Play 商店 連結網址:
 明渠水理計算_曼寧公式
https://play.google.com/store/apps/details?id=com.yuchihung.manning 




















一、已知一線段上之兩點座標

點1:(X1,Y1) 點2:(X2,Y2)

二、求解同一線段上X位置之Y

三、以同一線段之斜率應相同之原理進行計算

(X1-X2)/(Y1-Y2)=(X-X2)/(Y-Y2)

=>(Y-Y2)=(X-X2)*(Y1-Y2)/(X1-X2)

=>Y=(X-X2)*(Y1-Y2)/(X1-X2)+Y2......(A)

四、例已知點1(2,4), 點2(4,8),求解點3(3,Y)之Y值

將已知條件代入(A)式

Y=(3-4)*(4-8)/(2-4)+8=(-2)+8=6

故點3之座標為(3,6)

五、(A)式應用於外插時亦適用


1. Given the coordinates of two points on a line segment

Point 1: (X1, Y1) Point 2: (X2, Y2)

2. Solve the Y of the X position on the same line segment

value

3. Calculation based on the principle that the slopes of the same line segment should be the same

(X1-X2)/(Y1-Y2)=(X-X2)/(Y-Y2)

=>(Y-Y2)=(X-X2)*(Y1-Y2)/(X1-X2)

=>Y=(X-X2)*(Y1-Y2)/(X1-X2)+Y2......(A)

4. Example: given point 1(2,4), point 2(4,8), find the Y value of point 3(3,Y)

Substitute known conditions into (A) formula

Y=(3-4)*(4-8)/(2-4)+8=(-2)+8=6

Therefore, the coordinates of point 3 are (3,6)

5. Formula (A) is also applicable when it is applied to extrapolation






沒有留言:

張貼留言