How to get simulated values for a polynomial given the coefficients.

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.

댓글 수: 2

Are you trying to generate a random sample set of polynomial coefficients given some type of error distribution of the coefficients? Or what?
Thanks. I have the coeeficients of polynomial: a0 + a1*x + a2*x^2 + a3*x^3. I need to simulate 1000 polynomial values

댓글을 달려면 로그인하십시오.

 채택된 답변

Star Strider
Star Strider 2018년 1월 2일

0 개 추천

I have no idea what you want to do.
If you want to evaluate your polynomial (represented by the coefficient vector) at a particular value of the variable, use the polyval (link) function.

댓글 수: 4

Thanks! How to use the error term, since my coefficients are from regression of many scattered data.
My pleasure.
The errors are most likely modeled as being normally distributed, so the randn or normrnd functions could work. however, that is not the best way to calculate prediction confidence limits.
Rather than generating a number of simulations, if your polynomial fits created confidence intervals on the predictions, such as those created by the polyconf (link) function, use that instead. (If you do not have the Statistics and Machine Learning toolbox, the File Exchange contribution polypredci (link) does the same.)
Let me read....Thank you so much!
My pleasure!
I will help as I can.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

태그

질문:

JFz
2018년 1월 2일

댓글:

2018년 1월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by