Effacer les filtres
Effacer les filtres

Using abs in a polynomious

1 vue (au cours des 30 derniers jours)
mar vouz
mar vouz le 10 Jan 2016
Modifié(e) : mar vouz le 26 Avr 2016
uu

Réponse acceptée

Walter Roberson
Walter Roberson le 10 Jan 2016
You cannot pass a function handle to polyval.
"The input argument p is a vector of length n+1 whose elements are the coefficients in descending powers of the polynomial to be evaluated."
Notice that your ap already does a polyval, so even if you invoked ap somehow it would be a mistake to use it in polyval afterwards.
You should just be using
y2 = abs(polyval(x2,p));
trapz(x2, y2)

Plus de réponses (0)

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by