trapuneq (unequal spaced trapezoidal rule quadrature)
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
Respuestas (1)
Sam
el 14 de Abr. de 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 comentarios
Ver también
Categorías
Más información sobre Polygons en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!