Suppose all I am given, is the coordinates of two points like the following:

What are some ways I could go about finding the values of every point on this line segment? Like the y-value at 2.3, 2.4, 2.7 etc.
Any suggestions as to how I could go about doing this would be appreciated.