Integrates a 2D anonymous function over a 2D Polygon area
Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
By default, the error is about 0.03% but you can change this within the function at the cost of calculation time.
It will vary slightly depending on what shape you are using.
valOut=integPoly(f,polyIn) %integrate function f(x,y) over the polyshape polyIn
Inputs: function handle (over x and y), polyshape
Output: the integrated value over the area of the polygon
NOTE!: You can change the speed of the calculation (and get some error). See below
Ex:
pgon = polyshape([3,5,1],[9,3,6]); %Polygon Creation
fun_name=@(x,y)sum(x,y); %Function Creation
val_name=integPoly(function,pgon); %Integration function call
Created By: Audra Smith
2024/12/04
Adapted from
Big thank you to https://stackoverflow.com/users/1947677/itay
Citar como
Audra Smith (2024). integPoly (https://www.mathworks.com/matlabcentral/fileexchange/176934), MATLAB Central File Exchange.
Agradecimientos
Inspirado por: intpoly(f,x,y)
Información general
- Versión 1.0.1 (1,76 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión desde R2022a
Compatibilidad con las plataformas
- Windows
- macOS
- Linux