# BILINEAR INTERPOLATION 2D ARRAY

• ### Question

• I need a code that searches through the 2D Array  and returns a value based on this search. For example I want to know if the X value is 1.58, and Y value is 17.58 what is the  results.

example A part of array

{

 {XY,-1,-0.5,0,1,1.5,2,2.5,3,3.5,4,}, _ {0,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34}, _ {1,0.35,0.36,0.36,0.36,0.36,0.36,0.36,0.36,0.36,0.36,0.36}, _ {2,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38,0.38}, _ {3,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4}, _ {4,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42,0.42}, _ {5,0.45,0.44,0.44,0.44,0.44,0.44,0.44,0.44,0.44,0.44,0.44}, _ {6,0.47,0.47,0.47,0.47,0.47,0.46,0.46,0.46,0.46,0.46,0.46}, _ {7,0.5,0.5,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49,0.49}, _ {8,0.53,0.53,0.52,0.52,0.52,0.52,0.52,0.51,0.51,0.51,0.51}, _ {9,0.56,0.56,0.55,0.55,0.55,0.54,0.54,0.54,0.54,0.54,0.54}, _ {10,0.59,0.59,0.58,0.58,0.58,0.57,0.57,0.57,0.57,0.57,0.56}, _ {11,0.62,0.62,0.62,0.61,0.61,0.6,0.6,0.6,0.6,0.59,0.59}, _ {12,0.65,0.65,0.65,0.64,0.64,0.64,0.63,0.63,0.63,0.62,0.62}, _ {13,0.69,0.68,0.68,0.68,0.67,0.67,0.67,0.66,0.66,0.66,0.65}, _ {14,0.72,0.72,0.72,0.71,0.71,0.7,0.7,0.7,0.69,0.69,0.68}, _ {15,0.76,0.75,0.75,0.75,0.74,0.74,0.74,0.73,0.73,0.72,0.72}, _ {16,0.8,0.79,0.79,0.78,0.78,0.77,0.77,0.77,0.76,0.76,0.75}, _ {17,0.84,0.83,0.82,0.82,0.82,0.81,0.81,0.8,0.8,0.8,0.79}, _ {18,0.88,0.87,0.86,0.86,0.85,0.85,0.84,0.84,0.84,0.83,0.83}, _ {19,0.92,0.91,0.9,0.9,0.89,0.89,0.88,0.88,0.87,0.87,0.87}, _ {20,0.96,0.95,0.95,0.94,0.93,0.93,0.92,0.92,0.91,0.91,0.9}, _ {21,1,0.99,0.99,0.98,0.97,0.97,0.96,0.96,0.95,0.95,0.94}, _ {22,1.05,1.04,1.03,1.02,1.02,1.01,1,1,0.99,0.99,0.98}, _ {23,1.09,1.09,1.08,1.07,1.06,1.05,1.05,1.04,1.03,1.03,1.02}, _ {24,1.14,1.13,1.12,1.11,1.11,1.1,1.09,1.08,1.08,1.07,1.07}, _ {25,1.19,1.18,1.17,1.16,1.15,1.14,1.14,1.13,1.12,1.12,1.11}, _ {26,1.24,1.23,1.22,1.21,1.2,1.19,1.18,1.18,1.17,1.16,1.15}, _ {27,1.29,1.28,1.27,1.26,1.25,1.24,1.23,1.22,1.22,1.21,1.2}, _ {28,1.34,1.33,1.32,1.31,1.3,1.29,1.28,1.27,1.26,1.26,1.25}, _ {29,1.4,1.39,1.38,1.36,1.35,1.34,1.33,1.32,1.31,1.3,1.3}, _ {30,1.45,1.44,1.43,1.42,1.41,1.39,1.38,1.37,1.36,1.35,1.34}, _ {31,1.51,1.49,1.48,1.47,1.46,1.45,1.44,1.42,1.41,1.4,1.4}, _ {32,1.63,1.62,1.54,1.53,1.51,1.5,1.49,1.48,1.47,1.46,1.45}, _ {33,1.68,1.67,1.66,1.58,1.57,1.56,1.55,1.53,1.52,1.51,1.5}, _ {34,1.74,1.73,1.72,1.7,1.69,1.61,1.6,1.59,1.58,1.56,1.55}, _ {35,1.8,1.78,1.77,1.76,1.75,1.74,1.73,1.65,1.63,1.62,1.61}, _ {36,1.86,1.84,1.83,1.82,1.8,1.79,1.78,1.77,1.76,1.68,1.67}, _ {37,1.91,1.9,1.89,1.87,1.86,1.85,1.84,1.82,1.81,1.8,1.79}, _ {38,1.98,1.96,1.95,1.93,1.92,1.9,1.89,1.88,1.87,1.86,1.85}, _ {39,2.04,2.02,2.01,1.99,1.98,1.96,1.95,1.94,1.93,1.91,1.9}, _ {40,2.1,2.08,2.07,2.05,2.04,2.02,2.01,2,1.98,1.97,1.96}, _ {41,2.17,2.15,2.13,2.11,2.1,2.08,2.07,2.06,2.04,2.03,2.02}, _ {42,2.24,2.22,2.2,2.18,2.16,2.15,2.13,2.12,2.1,2.09,2.08}, _ {43,2.31,2.28,2.26,2.24,2.23,2.21,2.19,2.18,2.16,2.15,2.14}, _ {44,2.38,2.35,2.33,2.31,2.29,2.27,2.26,2.24,2.23,2.21,2.2}, _ {45,2.45,2.42,2.4,2.38,2.36,2.34,2.32,2.31,2.29,2.28,2.26}, _ {46,2.52,2.5,2.47,2.45,2.43,2.41,2.39,2.37,2.36,2.34,2.32}, _ {47,2.59,2.57,2.55,2.52,2.5,2.48,2.46,2.44,2.42,2.41,2.39}, _ {48,2.66,2.64,2.62,2.6,2.57,2.55,2.53,2.51,2.49,2.47,2.46}, _ {49,2.73,2.71,2.69,2.67,2.65,2.62,2.6,2.58,2.56,2.54,2.52}, _ {50,2.81,2.78,2.76,2.74,2.72,2.7,2.67,2.65,2.63,2.61,2.59}, _
}
Monday, September 16, 2019 9:01 PM

### All replies

• Hello,

Can you indicate what has been written codewise up to this point?

Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

NuGet BaseConnectionLibrary for database connections.

StackOverFlow

Monday, September 16, 2019 9:09 PM