MATLAB: How to get simulated values for a polynomial given the coefficients.
MATLAB
Hi,
I need to simulation 1000 values out of a polynomial which I have the coefficients and errors. What is the best way to do that in Matlab. Is there a function already?
Thanks a lot.
Best Answer
I have no idea what you want to do.
If you want toevaluate your polynomial (represented by the coefficient vector) at a particular value of the variable, use thepolyval (link) function.
One option is the Statistics and Machine Learning Toolboxfitlm (link) function. Then use thepredict function (linked at the end of that page).
Another option is to suepolyfit andpolyval with the File Exchangepolypredci function, or the Statistics and Machine Learning Toolboxpolyconf (link) function.
Best Answer