In the 1950s, Lewis Richardson was trying to determine if there is a relationship
between countries’ border lengths and the probability of war. During his research, he
noticed that the reported length of borders varied widely between sources. The
prevailing method for measuring borders (or coastlines) was to take segments of equal
length \(L\) and lay them on a map or photograph and then record the total length of
the segments. However, Richardson noticed that using smaller and smaller segment lengths
resulted in longer and longer total coastline results. In some cases, it is even true
that as \(L\) approaches zero, the length of the coastline approaches infinity. This
is now known as the Coastline
Paradox. This phenomenon is a result
of the fractal-like nature of
coastlines, and it also applications in image analysis, acoustics, and material science.
In this task you will find an equation that models the relationship between scale and
coastline length by using a linear regression
Draft a flowchart for this task and save it as
ma4_ind_username.pdf.
Open the
ENGR133_MATLAB_Template.mMATLAB template and complete the header information. Save your script as
ma4_ind_2_username.m
Import the data from the
coastline.csv file. There
are two columns of data in the file. The first contains the scale length (in
\(\kilo\meter\)) used to measure the coastline. The second contains the measured
length of the coastline (in \(\kilo\meter\)).
Using the data you imported, make four subplots in one figure of scale length versus
coast length as described below. Be sure to plot the data as points and to format
your plots for professional presentation.
Plot 1: both axes are linear
Plot 2: x-axis is logarithmic, y-axis is linear
Plot 3: x-axis is linear, y-axis is logarithmic
Plot 4: both axes are logarithmic
Determine which plot makes the data appear most linear. Use polyfit to
perform a linear regression on the and plot the regression line with the data on the
plot that you chose.
Hint
If data appear most linear on the semi-log or log-log plots, you will need to
appropriately transform the data before entering it in polyfit. For more
help, review the Non-Linear Regression video.
Use your model to determine the length of the coastline if it were measured at a
\(\qty{100}{\kilo\meter}\) scale, a \(\qty{50}{\kilo\meter}\) scale, and a
\(\qty{.001}{\kilo\meter}\) scale.
Create an appropriately formatted output that displays the equation of your
regression line, and the results of your calculations from step 5.
Publish your script as a PDF and name it
ma4_ind_1_username.pdf.