Question: Problem 4 ( 8 points ) You are a data analyst for a dinosaur dig. Five of your coworkers measured the dimensions of various bones
Problem points
You are a data analyst for a dinosaur dig. Five of your coworkers measured the dimensions of
various bones from each dinosaur and recorded their data in HWFossils.txt The file
has one row of headings and six rows of data. Each row of data contains an identifying number
and measurements for a particular dinosaur specimen that they are digging up Each coworker
specialized in a particular area of dinosaur anatomy and measured the same feature for all six
dinosaurs. For instance, Sediba measured femur length for all the specimens. Unfortunately,
your boneheaded coworkers didn't discuss precision of measurements beforehand, so they
measured to different numbers of decimal places. Each person used the same number of decimal
places for their own measurements, but some used one place, while others used two or three.
You want the data precision to be consistent in your report, so you decide to write some
MATLAB code to do the following:
Pull in the data using fscanf. The header information at the top of each column does
not need to be saved. Store the specimen numbers in a vector. The measurement data
can either be stored in a matrix or in five vectors your choice!
For each column of measurement data, find the number of decimal places.
Write the following to an output file titled HWFossilsRounded. txt:
The number of decimal places in each coworker's data column, in order.
The original values, in the same five columns, but rounded to one decimal place.
Your output should look like roughly like this:
Where each is a number. The spacing between values in the same line is
unimportant as long as it is at least one space wide.
The following might be helpful:
The round function will be handy in determining the number of decimal places.
You can add a tab within an fprintf statement using
You may assume that all of the values in the first row have no zeros to the right of the
decimal point.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
