필터 지우기
필터 지우기

Using abs in a polynomious

조회 수: 1 (최근 30일)
mar vouz
mar vouz 2016년 1월 10일
편집: mar vouz 2016년 4월 26일
uu

채택된 답변

Walter Roberson
Walter Roberson 2016년 1월 10일
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)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by