varea.m

Version 1.0.0.0 (643 Bytes) by Kang Zhao
Compute the area and judge the direction of a closed curve.
1.9K Downloads
Updated 23 Apr 2003

No License

Compute the area and judge the direction of a closed curve.
function area=varea(C)
%VAREA compute the "sign-area" of a closed curve.
% NOTE: Sign-area equals to the area of the closed curve when it is in anti-clockwise and equals to the negative area when it is in clockwise.
% Negative area means equal to area in magnitude but is negtive in sign.We can see that this script may also be used to judge the direction of a closed curve.
% C provides the coordinats of the nodes of the curve in the following way:
% C=[x1 x2 ...
% y1 y2 ...]
% AREA=VAREA(C)
% AREA returns the area of the curve(>0) when it is in anti-clockwise
% AREA returns the negtive area of the curve(<0) when it is in clockwise

Cite As

Kang Zhao (2024). varea.m (https://www.mathworks.com/matlabcentral/fileexchange/3284-varea-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Vector Fields in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0