The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Calculating area under a complicated curve
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Flopi

Canada
9 Posts

Posted - 03/16/2016 :  09:31:06 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello all,
I would like to calculate an area with ORIGIN. The issue is that the data I have look like the following image




There are some x-position where we have 2 (or more) y-values. My question is then twofold : is the integrate operation in ORIGIN calculating the proper area under my curve (i.e. the area enclosed by the curve). If not, how shoud I proceed to obtain the proper area ?
Thanks a lot for your help

Castiel

343 Posts

Posted - 03/17/2016 :  04:05:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Flopi

Hello all,
I would like to calculate an area with ORIGIN. The issue is that the data I have look like the following image




There are some x-position where we have 2 (or more) y-values. My question is then twofold : is the integrate operation in ORIGIN calculating the proper area under my curve (i.e. the area enclosed by the curve). If not, how shoud I proceed to obtain the proper area ?
Thanks a lot for your help



I suppose you are looking for something equivalent to polyarea(X, Y) in MATLAB. Here it is:
OCMATH_API_MUST double ocmath_d_polygon_area(double* pX, double* pY, uint nSize)

It's available in Origin C though.

妾+   午旦  妹罕妾  妾伊    用仇  妾/     岫ㄞ
 妾京用 仍巨  件 侈   件戶' 甘岫平   /欠  白岫妹
   併             艮          岫  奈 白   岫
                              岫
Go to Top of Page

AmandaLu

439 Posts

Posted - 03/17/2016 :  04:21:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Flopi,

Analysis: Mathematics: Integrate can calculate such area. See image below:



Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

Flopi

Canada
9 Posts

Posted - 03/17/2016 :  04:57:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your answers.
So if I understand correctly AmandaLu the integrate function is already doing the job without any additional correction ? Does the area has to be closed though (like your disk) ?
Go to Top of Page

Chris D

428 Posts

Posted - 03/17/2016 :  10:01:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Try this.

Follow the steps outlined in the screen shots below to enclose your data into a polygon area. you may have to adjust the steps based on your actual data but this will point you in the right direction.

Once you do that, you can go to the analysis menu and select Mathematics->Polygon Area to integrate the enclosed polygon.



Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page

Flopi

Canada
9 Posts

Posted - 03/17/2016 :  10:39:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your answer. It's exactly what I need. I have however a last question. In my case, I don't have a clean curve as yours when I plot it. I have rather what is on the following image. The enclosing for the polygon follows this graph and is not quite I want...

Go to Top of Page

Chris D

428 Posts

Posted - 03/17/2016 :  12:04:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Perhaps you can rearrange your data so that it follows a line shape as appears in your original data (which I simulated). There isn't too much else that can be done that does not require some manual work on your part to get a polgygon shape.

Thanks,
Chris Drozdowski
Originlab Technical Support
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000