From: Khalid on
hi there!!

I plotted heat contours on (x,y) plane, I wud like to know the area covered by each contour is that possible?
Thanks
From: ImageAnalyst on
On Nov 1, 7:49 am, "Khalid " <khabu...(a)hotmail.com> wrote:
> hi there!!
>
> I plotted heat contours on (x,y) plane, I wud like to know the area covered by each contour is that possible?
> Thanks

------------------------------------------------------------------------------------------------
How about using the polyarea() function?
From: Khalid on
Thank you ImageAnalyst for your reply. as you might see I am new to matlab. the plotting i did is as following:
figure (1)
[c,h]=contourf(xg,yg,irw,40);
% clabel(c,h);
colorbar;
xlabel('PI * DA');
ylabel('THA');
grid
do i just need to add the function polyarea(x,y) to it and it will calculate the area of each contour?
I appreciate your time and help

ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <4979e96b-4f8b-4baa-bd00-1cd242f13c96(a)m38g2000yqd.googlegroups.com>...
> On Nov 1, 7:49?am, "Khalid " <khabu...(a)hotmail.com> wrote:
> > hi there!!
> >
> > I plotted heat contours on (x,y) plane, I wud like to know the area covered by each contour is that possible?
> > Thanks
>
> ------------------------------------------------------------------------------------------------
> How about using the polyarea() function?
From: Rob Comer on
I'm wondering what you mean by the "area of the contour." The contours are lines, of course, so they don't have area themselves. I'm guessing that you want the area above a given contour level, or the area below that level, or the area between two adjacent levels.

You can get the patch children of the contour group from the handle h returned by contourf, and you can get the polygons defined by their XData and YData properties, but be careful -- the polyarea function is only part of the solution. What makes it challenging is that near the tops of "hills" these polygons enclose areas above a certain contour level, but near the bottoms of "pits" they enclose areas below a certain level. The inpolygon function might be useful in sorting things out.
From: Khalid on
Thanks for your comments
Let me try to explain to you the problem, I have the X,Y,Z for a cylinder. I am calculating the radiant heat IRW which is received by this cylinder from a heating source and it is heating the cylinder from one side. I want to plot this radiant heat on the cylinder and I could do that, now I have different areas of the cylinder receiving different amount of heat. I would like to know how to calculate these areas.
Thank you again


"Rob Comer" <rob.comer.nospam(a)mathworks.com> wrote in message <hckk8u$fkn$1(a)fred.mathworks.com>...
> I'm wondering what you mean by the "area of the contour." The contours are lines, of course, so they don't have area themselves. I'm guessing that you want the area above a given contour level, or the area below that level, or the area between two adjacent levels.
>
> You can get the patch children of the contour group from the handle h returned by contourf, and you can get the polygons defined by their XData and YData properties, but be careful -- the polyarea function is only part of the solution. What makes it challenging is that near the tops of "hills" these polygons enclose areas above a certain contour level, but near the bottoms of "pits" they enclose areas below a certain level. The inpolygon function might be useful in sorting things out.