Question: MEPV 1 0 2 Practical Example 3 . 2 - Carbon 1 4 Dating MEPV 1 0 2 Practical Example 3 . 6 - For

MEPV102 Practical Example 3.2- Carbon 14 Dating MEPV102 Practical Example 3.6- For loop examples
Use a For loop to solve the following problems:
a) Create a table that converts inches to feet. Convert the values ranging between 0 and 24
inches (with increments of 3) to feet.
b) Consider the following matrix values:
x=[45,23,17,34,85,33]
By using a counter how many values are greater than 30?
c) Repeat the previous exercise, this time by using the find command.
d) Use a For loop to sum the elements of the matrix in problem 2. Check your results with the
sum function. (Use the HELP feature to assist you how to use sum).
e) Use a For loop to create a vector containing the first 10 elements in the alternating harmonic
series, i.e.
11,-12,13,-14,15dots-110 MEPV102 Practical Example 4.2- Storing Planetary Data with Structure
Arrays
Structure arrays can be used much like a database. You can store numeric information, as well as character data or any of the other data types supported by MATLAB. Write a MATLAB program that will create a structure array from the information given in the table below. Your program should prompt the user to enter the data separately for the given planets and then store the information as a structure array. Make use of a WHILE loop to enter and store the data, and a SWITCH/CASE structure to check if the data has been entered correctly. Make use of the MENU function to control your loop and branching structure.
\table[[Planet Name,\table[[Mass, in Earths],[Multiples]],\table[[Length of Year, in],[Earths Years]],\table[[Orbital Velocity,],[km/s]]],[Mercury,0.055,0.24,47.89],[Venus,0.815,0.62,35.03],[Earth,1,1,29.79],[Mars,0.107,1.88,24.13],[Jupiter,318,11.86,13.06],[Saturn,95,29.46,9.64],[Uranus,15,84.01,6.81],[Neptune,17,164.8,5.43],[Pluto,0.002,247.7,4.74]]
A radioactive isotope of an element is a form of the element that is not stable. Instead it
spontaneously decays into another element over a period of time. Radioactive decay is an
exponential process. If Q0 is the initial quantity of a radioactive substance at time t=0, then
the amount of the substance which will be present at any time t in the future is given by:
Q(t)=Q0e-t
where (Lambda) is the radioactive decay constant.
Because radioactive decay occurs at a known rate, it can be used as a clock to measure the
time that has elapsed since the decay started. If we know the initial amount of the
radioactive material Q0 present in a sample and the amount of material Q left at the current
time, we can solve for t in the above mentioned equation to determine how long the decay
has been going on. Equation 2.1 has practical applications in many areas of science. For
example, archaeologists use a radioactive clock based on carbon 14 to determine the time
that has passed since a once living thing died. Carbon 14 is continually taken into the body
while a plant or animal is living, so the amount of it present in the body at the time of death
is assumed to be known. The decay constant of carbon 14 is well known to be
0.00012097year. Write a MATLAB program that will prompt the user to enter the
percentage of carbon 14 remaining in a sample and then calculates the age of the sample
from it. Displays the results with the correct units by means of the display function in the
Command Window.
MEPV 1 0 2 Practical Example 3 . 2 - Carbon 1 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!