next up previous contents
Next: About this document ... Up: Plotting functions Previous: Plotting functions   Contents

ellipse.m

Syntax:

[x,y] = ellipse(N10,delN10,N26,delN26,0,plotString)
[h1] = ellipse(N10,delN10,N26,delN26,1,plotString)
[h1,h2] = ellipse(N10,delN10,N26,delN26,2,plotString)

Plots an uncertainty ellipse on the [$ ^{10}$Be]$ ^{*}$ - [$ ^{26}$Al]$ ^{*}$ / [$ ^{10}$Be]$ ^{*}$ diagram (the `Lal-Klein-Nishiizumi Al-Be diagram').

The arguments N10, delN10, N26, and delN26 are the $ ^{10}$Be and $ ^{26}$Al concentrations and their uncertainties (atoms $ \cdot$ g$ ^{-1}$).

The third argument can be 0, in which case the function returns the x and y coordinates of the $ 1-\sigma$ uncertainty ellipse; 1, in which case the function plots the $ 1\sigma$ uncertainty ellipse and returns its handle; or 2, in which case the function plots $ 1\sigma$ and $ 2\sigma$ uncertainty ellipses and returns their handles. The default is 1.

The argument plotString is an optional string telling the function what line type and color to use to draw the ellipse. See the documentation for the MATLAB function plot for more information.

What this function actually does is calculate the joint probability on a mesh in $ (x,y)$:

$\displaystyle p(x,y) = x \exp{ \left( -0.5 \left[ \frac{ xy - N_{26}}{\sigma N_...
...} \right] ^{2} + \left[ \frac{ x - N_{10}}{\sigma N_{10}} \right] ^{2} \right)}$ (83)

It then creates a normalized cumulative distribution for $ p$ to determine the values of $ p$ that account for 68% and 95% of the total probability, and draws contours of the 2-d PDF at those values.


next up previous contents
Next: About this document ... Up: Plotting functions Previous: Plotting functions   Contents
2007-11-13