integPoly

Version 1.0.1 (1,76 ko) par A
Integrates a 2D anonymous function over a 2D Polygon area
1 téléchargement
Mise à jour 4 déc. 2024

Afficher la licence

Integrates a 2-Dimensional (x,y) function over a 2D polygon, from MATLAB's polyshape or nsidedpoly.
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

Citation pour cette source

Audra Smith (2024). integPoly (https://www.mathworks.com/matlabcentral/fileexchange/176934), MATLAB Central File Exchange.

Compatibilité avec les versions de MATLAB
Créé avec R2022a
Compatible avec les versions R2022a et ultérieures
Plateformes compatibles
Windows macOS Linux
Remerciements

Inspiré par : intpoly(f,x,y)

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.1

fixed citation

1.0.0