File Exchange

image thumbnail

Contour Area Calculation

version 1.0 (8.64 KB) by

Calculates the area of contour regions.

2.83333
6 Ratings

8 Downloads

Updated

No License

This program displays the contour plot of an mxn (m ~= n) matrix, and then calculates the area for regions above a given level. This is a brute force implementation. It probably has some bugs, and there are probably more elegant ways to do this, but it does what I need. I am open to feedback on how to improve the code.

Comments and Ratings (7)

Reja Rabbi

I want to use the code to find area of a intensity image ,the intensity values ranges from 0-255. How should I make the axes for the code? Any help is highly appreciated.

Tommy Frank

Thanks Phillip

n chandrasekhar

excellent

Dimiter Prodanov

clears workspace; not a function;
very trivial

Duane Hanselman

Warning this is not a function. It is a script that clears the base workspace!

Manjunath Shantharamu

It is good and can we appy this to calculate an area of any irregular shape, is so how? Thank U

Ira B

Updates

Updated description.

Found out how to correctly plot only a single contour in Matlab. Added an example xls data file.

Fixed potential problem when last point in a contour line/polygon is (0,0).

Minor modifications to code.
Tried to add screenshot.

Updated the program to calculate the area above (not below) a certain contour level. Also modified the program to accept any mxn matrix

MATLAB Release
MATLAB 6.5.1 (R13SP1)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video