trapuneq (unequal spaced trapezoidal rule quadrature)
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi... I hope that I can solve a problem about trapenuq formula
x = [0 .12 .22 .32 .36 .4 .44 .54 .64 .7 .8];
y = 0.2+25*x-200*x.^2+675*x.^3-900*x.^4+400*x.^5;
trapuneq(x,y)
??? Undefined function or variable 'l'.
Error in ==> trapuneq at 18 s = s + (x(k+l)-x(k))*(y(k)+y(k+l))/2;
thanks
Réponses (1)
Sam
le 14 Avr 2023
Changing the 2 "l"s ("L"s; Capital shown for variable clarity) to a "1" ("One") in the line of the For loop fixes the error and allows the same anser to be attained as shown in the textbook (1.5948).
0 commentaires
Voir également
Catégories
En savoir plus sur Calculus 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!