Problem with Polyval, potential bug
Mostra commenti meno recenti
So i am having a bug with poly val.
I am issuing the function two vectors. The first being a vector of coeficients.
The second is a vector that is 1023X1 long. and those are my ex coordinates. It is of type double.
each number in the vector is a very small number 2.0e-9 for example
When polyval runs, it is running the x coordinates as 1,2,3,4,.....1023. so somehow, someway it is using the index of the vector instead of the data in the vector location.
I cant for the life of me figure out why. The vector is 1023X1 so there is no other data in the vector. Clicking on the vector and bringing it up in the table format of the workspace varieified whats in it. I think this is a bug.
Can anyone help?
3 Commenti
Steven Lord
il 17 Feb 2021
Can you show us a concrete example (say your coefficient vector, the first ten elements of your X values, and the call to polyval that gives different answers than you expected?
In addition, if you generated your coefficient vector using a call to polyfit can you show us that call too?
Robert
il 17 Feb 2021
Robert
il 17 Feb 2021
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
