Hope I have understood your question, if not, please do not hesitate to correct me.
Lets understand with an example, say t as array with range 0 to 5
And you have evaluated the x, which is function of t, lets say x=t^2
x=[0 1 4 9 16 25]
Now, you want to get the x value at t = 2.3, right? Lets plot the original data
Next You may have use polyfit function to fit the data points, please refer MATLAB Doc
Create the data range as fiting datapoints
See the results, original data points and fiting datapoints
Next, you want to get the x value the same as t = 2.3, x(2.3), In MATLAB or any other languages, you have to carefully deals with floating points numbers. Most cases 1.0 is not equal to 1. Refer the links, for more details Link1, Link2
Next the task is, get the indix position (idx) of t1, where t1 value is nearest to 2.3, hence I have used absolate (irrespective of sign) and get the minimum, please check the near_val, which is still not zero in subtraction cases, which menas the t1 datapoints is not exactly as 2.3, see other poly order and practice more.
Once you get the idx, get the corresponding x values from the fitting data points, hence x1 value at idx index position
Hope this helps, I know, the answer is quite long, but it is a very important issue in the number of cases, so that it can help others too (novices).