Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The goal of this problem is to calculate the number random xycoords that are in each region of a target using a user defined function

 The goal of this problem is to calculate the number random xycoords that are in each region of a target using a user defined function named mytargetpractice that uses logical arrays. To begin, first use code from the lab07demo.m to set the random seed value of 123, and to create an x of 250 random values and a y array of 250 random values. Then plot three black (k) circles as decribed below The inner (Bullseye) circle should have a radius of 1 The middle circle should have a radius of 2 The outer circle should have a radius of 1 Then Add code the the user defined mytargetpractice function that is located at the bottom of the lab07demo.m file so that the function can be used to correctly calculate and return logical arrays of xycoords that are located in each region of the target. Then use the mytargetpractice function to calculate the number of xycoords that hit in each region of the target. Assign p02a with the number of xycoords that are bullseyes Assign p02b with the number of xycoords that are in the middle circle Assign p02c with the number of xycoords that are in the outer circle Assign p02d with the number of xycoords that missed the target Use the plot cmd to plot the xycoords that go in each respective region of the target as described below. Bullseye - red circles with black edges MiddleCircle - green circles with black edges OuterCircle - blue circles with black edges Miss - yellow circles with black edges Use the title, xline, yline, xlabel, ylabel, axis, xticks, yticks, legend, and box on cmds, so that your plot exactly matches the example output (but use your username@calpoly.edu). Use the savefig cmd to save your p02fig as p02fig.fig Use the print cmd to create a .png file named p02fig.png

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_2

Step: 3

blur-text-image_3

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

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions