Ale Fall 2017: MATLAB in M eTextbooks | Rent or Bu x Bookshelf Online: MATL > Se
ID: 3184325 • Letter: A
Question
Ale Fall 2017: MATLAB in M eTextbooks | Rent or Bu x Bookshelf Online: MATL > Secure https://bookshelf.vitalsource.com/#/books/9781 1 1929925 Apps Bookmarks D History N Netflix G Google @wps.pearsoncustom. Other bookmarks For the function name and arguments, use d3 - det3by3 (A), where the input argument A is the matrix and the output argument d3 is the value of the determinant. Write the code of det3by3 such that it has a subfunction that calculates 2 x 2 the determinant. Use det3by3 for calculating the determinants of 1 3 2 (a) 6 5 4 2.5 7 1 (b)5 -3 -2.6 31. The shortest distance between two points on the surface of the globe (great-circle distance) can be calculated by using the haversine formula. If 1 and 1 are the latitude and longitude of point 1 and 2 and 2 are the latitude and longitude of point 2, the great circle distance between the points is given by: d = 2Rsin-i (va) where a-sin2 ( 13-91 1 ) + cos 1 cos 2 cos i sin2 ( 2 ) , and R-3959 mi is the Earth radius. Write a user-defined function that determines the distance between two points on the Earth. For the function name and arguments, use dis GreatCirDis(Lat1, Lng1,Lat2,Lng2), where the input arguments are the latitude and longitude of the two points (degrees in decimal format), and dis is the great-circle distance in miles. Use the function to calculate the distance between London (51.50853°,-0.12574°) and New York City (40.71427°,-74.00597*) 32. Delta rosette is a set of three strain gages oriented at 120° relative to each other. The strain measured with each of the strain gages is A-EA and EC. The principal strains 1 and 2 can be calculated from the strains measured with the rosette by: E2 256 MATLAB: An Introduction with ApplicationsExplanation / Answer
function dis = GreatCirDis(Lat1, Lng1, Lat2, Lng2)
Lat1 = deg2rad(Lat1);
Lat2 = deg2rad(Lat2);
Lng1 = deg2rad(Lng1);
Lng2 = deg2rad(Lng2);
a = sin((Lat2-Lat1)/2).^2 + cos(Lat1)*cos(Lat2)*(sin((Lng2-Lng1)./2)).^2;
dis = 2*3959*asin(sqrt(a));
end
GreatCirDis(51.50853,-0.12574,40.71427,-74.00597)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.