Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finding a center locations In lab, we learned how to plot a map and use ginput to select several points on the map. In lecture,

Finding a center locations
In lab, we learned how to plot a map and use ginput to select several points on the map. In lecture, we learned how to use a for loop to calculate an average.
Steps:
Plot a map of Lawrence using the following code:
lat N=39;
lats =38.9;
long E=264.6;
longW =264.9;
geolimits([lats latN],[longE longW])
geobasemap streets
hold on
Use the ginput function to collect the x and y positions of 10 points. These points should represent important locations around town (your workplace, your school, the grocery store, the gas station, your favorite restaurants...).
From step 2, you should get an array for x and an array for y that both have 10 points. For this, use a for loop to calculate the average x and y value:
xmean =i=110xi10
ymean =i=110yi10
Compare your answers to Matlab's built in mean function, for example: x mean 2=mean(x);
Finally, plot your average location using the code:
geoplot (xmean, ymean, 'd', 'MarkerSize ',10, 'MarkerFaceColor' ,'b')
image text in transcribed

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

Data Infrastructure For Medical Research In Databases

Authors: Thomas Heinis ,Anastasia Ailamaki

1st Edition

1680833480, 978-1680833485

More Books

Students also viewed these Databases questions