In order to get values of Y for different X can be found using the function "interp1".
As you have said, you need values of Y when X is 10,15 and 23. Here, 23 is out of the range of X as you originally specified it will from 0 to 20.
For such values, "interp1" will give NaN values. You can understand more about "interp1" from the following official MathWorks documentation:
Here is some boilerplate code for using the function:
X = linspace(0, 20, 100); % Example X data
Y = sin(X);               % Example Y data (non-linear relationship)
X_query = [10, 15, 23];
Y_query = interp1(X, Y, X_query);
disp(table(X_query', Y_query', 'VariableNames', {'X', 'Y'}));
Hope this helps!


