Nasser M. Abbasi於 2013年5月18日星期六UTC+8下午6時54分46秒寫道：
> On 5/18/2013 5:36 AM, Cheng Cosine wrote:
>
> > Hi:
>
> >
>
> > One can use contour() to plot contours. But how does one calculate the
>
> > length and area of a contour?
>
> >
>
> > Thanks,
>
> >
>
>
>
>
>
> From help:
>
>
>
> 
>
> load penny;
>
> figure;
>
> contour(flipud(P));
>
> axis square;
>
> 
>
>
>
> So, looking at the above. what length and what area are you
>
> refering to?
>
>
>
> one contour line represent the same value in the data.
>
>
>
> So, I am not even sure what measure of length you
>
> are taking about, and what area you want, since
>
> these lines can all change depending on how many
>
> contour lines you want. If you ask for 2 lines,
>
> you'll get different shapes.
>
>
>
> May be if you explain what is it you are trying to do,
>
> someone might have better suggestion.
>
>
>
> Nasser
The data file you referred to is too complicated. A single value corresponds
to more than one contours.
Suppose we have a "clean" circular disk and on it we have different contours.
A single value corresponds to a single contour. To be specific, those contours
are closed and concentric circular curves.
If we know the radius of a contour, we can compute its circular length as 2*pi*r and area as pi*( r_outer^2r_inner^2 ).
What I aksed for were to compute the perimeter and area when the target contour is not a simply cicle or ellipse.
