Evaluating polynomial at a certain x point to find y?
Show older comments
Hi all, so I have a script that evaluates the 1st through 4th degree polynomials of a given dataset of volume of liquid vs vol. of ice. I already did everything and plotted it just fine, the only thing I want to do is evaluate it for when x = 1.5 (vol. of liquid) for the 4th degree polynomial.
What I wanted/tried to do is just evaluate the anonymous function, but it's within the for-loop and I don't know to pull the 4th iteration so I can evaluate it at 1.5. Any tips?
Accepted Answer
More Answers (2)
Torsten
on 15 May 2018
coeff{i} = polyfit(volHotLiq, volIce, i);
if i==4
p_15 = polyval(coeff{i},1.5);
end
Emanuele Joy
on 15 May 2018
0 votes
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!