i have two values 12 and 15. Is my p=12x+15
Yes. And in particular in your code, that would be evaluated with x = 0
Delta = @(im_) polyval(Results.data2,im_);
In this case i did not understand anything. In this case data2 contains three values 4, 5 and 7.
Then that would be the polynomial 4*x^2 + 5*x + 7
What will be the results of Delta
Delta will not be a numeric value. Delta will be a "function handle". When you invoke Delta passing in a numeric parameter, then at the time you invoke it, the value that you pass in will be passed to polyval as the x for polynomial 4*x^2 + 5*x + 7 . For example,
Delta(-1:1)
would cause the polyomial to be evaluated for x = -1, x = 0, and x = 1
what actually is im_ in this case
im_ in this context is what is referred to as a "dummy argument". It stands in for whatever value is eventually passed in to the function handle. In the example Delta(-1:1), during the execution of the function handle body, im_ would temporarily be [-1 0 1] . If you were to then call Delta(7) then during the execution of the body of the function handle, im_ would be temporarily 7.