Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the Matlab code This Lab will consists of a single script, which will find the half-life of C14, and will plot the radioactive

I need the Matlab code

This Lab will consists of a single script, which will find the half-life of C14, and will plot the radioactive decay of C14 as a function of time. Carbon 14 decays according to a first order differential equation (ODE), by which the rate of decrease of C14 concentration is proportional to the negative of the C14 concentration. Your script will calculate the C14 concentration as a fraction of the initial value. The time units are years. The proportionality constant is: lambda = 1.2097 x 10-4 year -1 Write a script that will consist of two parts: Part I : define the value of lambda as a constant define a value of time increment, which should be changeable at a single location at the top of your code, equal to 1,000 years define a initial value of your C14 fraction as 1 solve the decay ODE by the Euler method, in a loop run the loop until the C14 has decreased to a fraction = 0.35 (35% of the initial concentration) the last value of C14 fraction may be lower than 0.35, as the time increments are 1,000 years, and your loop will stop the first time it encounters a fraction <= 0.35 calculate the half-life of C14 from your integration in the same loop above in which you integrate the ODE Part II : Define a function with the rhs of the ODE, in preparation for your Runge-Kutta solution define an initial C14 fraction = 1, just like in Part I define a span for the R-K integration from time = 0 until the time at which you reached 35% C14 fraction (or lower) in Part I, with increments every 10 years calculate the C14 fraction as a function if time by invoking the R-K Matlab function ode45( ) , using as arguments the parameters defined in the three preceding bullets calculate the half-life of C14 from your results The output from your script should be: the C14 half-life, in years, calculated using the Euler method the C14 half-life, in years, calculated using the Runge-Kutta method a plot showing: C14 fraction vs time calculated using the Euler method in a solid red line C14 fraction vs time calculated using the Runge-Kutta method in a solid blue line The data should go from fraction = 1 at time zero, down to a fraction of 0.35 (or slightly lower, but no lower than 0.3) The half-life calculated using the Euler method in a single red circle The half-life calculated using the R-K method in a single blue circle Appropriate axis labels, legend, title, and gridlines

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions