 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MATHCAD] Calculating area under a curve
| [MATHCAD] Calculating area under a curve |
|
Author: Mehrdad Sarfaraz
Posted: Mon, 14 Sep 1998 11:55:09 -0400
|
Does anyone know how to calculate area under a curve with Mathcad
Plus6.0? The curve is
enterd as a pair of data sets.
Thank you.
|
| Re: [MATHCAD] Calculating area under a curve |
|
Author: Jacqui Cheswick
Posted: Mon, 14 Sep 1998 17:33:10 +0100
|
Please find attached an example which I believe may be of help.
In it integration is performed on a set of x and y data in order to find
the area under the curve, by integrating on the interp function for the
data. In this example I've created the x and y data based on a known
function in order to check the results, but it should work for any set of x
and y data (as long as the x values are ascending).
Regards
Jacqui Cheswick
"jacqui.cheswick"
(See attached file: int_curve.mcd)
Mehrdad Sarfaraz "msarfara" on 14 09 98 16:55:09
Please respond to "mathcad"
To: "mathcad"
cc: (bcc: Jacqui Cheswick/Users/AdeptScientific)
Subject: [MATHCAD] Calculating area under a curve
Does anyone know how to calculate area under a curve with Mathcad
Plus6.0? The curve is
enterd as a pair of data sets.
Thank you.
begin: vcard
fn: Mehrdad Sarfaraz
n: Sarfaraz;Mehrdad
org: Department of Radiation Oncology, UMMS
adr: ;;22 South Greene St.;Baltimore;MD;21201;USA
email;internet: "msarfara"
title: Medical Physicist
tel;work: (410)328-7077
tel;fax: (410)328-5279
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
version: 2.1
end: vcard
|
|
Attachments:
int_curve.mcd
|
| Re: [MATHCAD] Calculating area under a curve |
|
Author: Drobinso
Posted: Mon, 14 Sep 1998 17:42:57 +0100
|
I assume that your two data sets are holding the x and y data. There are
many ways of doing what you want. Here are two that instantly come to mind.
1) Fun way, use one of the function fitting routines to obtain a
polynomial, or other suitable analytic approximation to the data, then use
the symbolic integration function and integrate between the lower and upper
limits of your data.
2) Mundane way, sort your x data into ascending order, remembering to
leave the y data associated with the corresponding x values, if they shift.
xn,yn and xn+1,yn+1 define a trapezium which you calculate its area.
Similarly xn+1,yn+1 and xn+2,yn+2 form a butt joining trapezium, and so on
right across your curve. Simply sum the area's of all of the trapeziums.
I am sure the other guy's will have much more elegant solutions. I look
forward to seeing them
Dave Robinson
Integral Vision
To unsubscribe: Send in the body: unsubscribe mathcad
To: "majordomo"
|
Previous by date: [MATHCAD] FIR - phase response, Legate, Ian
Next by date: Re: [MATHCAD] Calculating area under a curve, Jacqui Cheswick
Previous thread: [MATHCAD] NEWS: Mathcad 8 Professional, Paul Bragg
Next thread: [MATHCAD] Calculating area under a curve, Mehrdad Sarfaraz
|
|
|