only part 2 i need help
Part II) Work on the PROBLEMS 6.6 on page 238 and 239 of the text book. For a) you need to compose a separate function, distance.m. For b) you need to store the result in the variable, distance. Note: the hill height starts from 0 and increment 1000 feet up to 10,000 feet. Both scripts, Assignment03.mand distance.m should include a header with appropriate comments (similar to the textbook example). Grading Criterion: 1. Header - 10 points 2. Proper comments - up to 10 points 3. The rest points are evenly distributed. Submit both Assignment02.mand distance.m script files to the Blackboard. The template as follow (similar template should be used by distance.m): Author: Chu Jong Course: CSCI-1153 Section 102 Programming in MATLAB $ Term: Spring 2020 $ Assignment 03 - plotting and textbook PROBLEMS 6.6 Part I - plotting, two figures, Figure 1 and Figure 2 Figure 1 for a) and Figure 2 for b) $ Part II - Distance of Horizon A distance.m script function to compute the distance A variable distance to store the distance calculation *% Part 1 $$ Part II increases as you climb a mo b a mountain (B) 100 for values of n fru I 6.6 The distance to the horizon increases as v The expression b= V2rh + 12 where d=distance to the horizon r=radius of the earth h = height of the hill can be used to calculate that distance. The distance depends on the hill is, and on the radius of the earth (or another planetary bil Problems 239 (a) Create a function called distance.m to find the distance to the horizon. Your function should accept two vector inputs-radius and height and should return the distance to the horizon. Don't forget that you'll need to use meshgrid because your inputs are vectors. (b) Create a MATLAB program that uses your distance function to find the distance in miles to the horizon, both on the Earth and on Mars, for hills from 0 to 10,000 feet. Remember to use consistent units in your calculations. Note that Earth's diameter = 7926 miles Mars' diameter = 4217 miles Report your results in a table. Each column should represent a different planet, and each row a different hill height