MATLAB Mathematics - SERC - Index of
MATLAB Mathematics - SERC - Index of MATLAB Mathematics - SERC - Index of
2 Polynomials and Interpolation −47.95 −48 −4000 −48.05 −48.1 −48.15 −4000 −3500 −3000 −2500 −3500 −4000 Latitude −48.2 −48.25 −48.3 −4000 −2000 −3000 −3500 −1000 −2500 −2000 −1500 −3000 −3500 −48.35 −4000 −4000 −48.4 −48.45 210.8 211 211.2 211.4 211.6 211.8 Longitude The arguments for meshgrid encompass the largest and smallest x and y values in the original seamount data. To obtain these values, use min(x), max(x), min(y), and max(y). Closest-Point Searches. You can search through the Delaunay triangulation data with two functions: • dsearch finds the indices of the (x,y) points in a Delaunay triangulation closest to the points you specify. This code searches for the point closest to (211.32, -48.35) in the triangulation of the seamount data. xi = 211.32; yi = -48.35; p = dsearch(x,y,tri,xi,yi); [x(p), y(p)] ans = 211.3400 -48.3700 • tsearch finds the indices into the delaunay output that specify the enclosing triangles of the points you specify. This example uses the index of the 2-24
Interpolation enclosing triangle for the point (211.32, -48.35) to obtain the coordinates of the vertices of the triangle: xi = 211.32; yi = -48.35; t = tsearch(x,y,tri,xi,yi); r = tri(t,:); A = [x(r) y(r)] A = 211.3000 -48.3000 211.3400 -48.3700 211.2800 -48.3200 Voronoi Diagrams Voronoi diagrams are a closest-point plotting technique related to Delaunay triangulation. For each point in a set of coplanar points, you can draw a polygon that encloses all the intermediate points that are closer to that point than to any other point in the set. Such a polygon is called a Voronoi polygon, and the set of all Voronoi polygons for a given point set is called a Voronoi diagram. The voronoi function can plot the cells of the Voronoi diagram, or return the vertices of the edges of the diagram. This example loads the seamount data, then uses the voronoi function to produce the Voronoi diagram for the longitudinal (x) and latitudinal (y) dimensions. Note that voronoi plots only the bounded cells of the Voronoi diagram: load seamount voronoi(x,y) grid on xlabel('Longitude'), ylabel('Latitude') 2-25
- Page 28 and 29: 1 Matrices and Linear Algebra You c
- Page 30 and 31: 1 Matrices and Linear Algebra 0.9 0
- Page 32 and 33: 1 Matrices and Linear Algebra Inver
- Page 34 and 35: 1 Matrices and Linear Algebra X = p
- Page 36 and 37: 1 Matrices and Linear Algebra There
- Page 38 and 39: 1 Matrices and Linear Algebra The e
- Page 40 and 41: 1 Matrices and Linear Algebra The L
- Page 42 and 43: 1 Matrices and Linear Algebra In co
- Page 44 and 45: 1 Matrices and Linear Algebra Matri
- Page 46 and 47: 1 Matrices and Linear Algebra compu
- Page 48 and 49: 1 Matrices and Linear Algebra Eigen
- Page 50 and 51: 1 Matrices and Linear Algebra produ
- Page 52 and 53: 1 Matrices and Linear Algebra Singu
- Page 54 and 55: 1 Matrices and Linear Algebra 1-44
- Page 56 and 57: 2 Polynomials and Interpolation Pol
- Page 58 and 59: 2 Polynomials and Interpolation pol
- Page 60 and 61: 2 Polynomials and Interpolation Cal
- Page 62 and 63: 2 Polynomials and Interpolation whe
- Page 64 and 65: 2 Polynomials and Interpolation Int
- Page 66 and 67: 2 Polynomials and Interpolation int
- Page 68 and 69: 2 Polynomials and Interpolation 2 G
- Page 70 and 71: 2 Polynomials and Interpolation Int
- Page 72 and 73: 2 Polynomials and Interpolation for
- Page 74 and 75: 2 Polynomials and Interpolation Con
- Page 76 and 77: 2 Polynomials and Interpolation Lat
- Page 80 and 81: 2 Polynomials and Interpolation −
- Page 82 and 83: 2 Polynomials and Interpolation 7 3
- Page 84 and 85: 2 Polynomials and Interpolation T =
- Page 86 and 87: 2 Polynomials and Interpolation Bec
- Page 88 and 89: 2 Polynomials and Interpolation Int
- Page 90 and 91: 2 Polynomials and Interpolation 2-3
- Page 92 and 93: 2 Polynomials and Interpolation 2-3
- Page 94 and 95: 3 Fast Fourier Transform (FFT) Intr
- Page 96 and 97: 3 Fast Fourier Transform (FFT) 200
- Page 98 and 99: 3 Fast Fourier Transform (FFT) 2 x
- Page 100 and 101: 3 Fast Fourier Transform (FFT) 500
- Page 102 and 103: 3 Fast Fourier Transform (FFT) Func
- Page 104 and 105: 4 Function Functions Function Summa
- Page 106 and 107: 4 Function Functions You can also c
- Page 108 and 109: 4 Function Functions 25 20 15 10 5
- Page 110 and 111: 4 Function Functions Minimizing Fun
- Page 112 and 113: 4 Function Functions To try fminsea
- Page 114 and 115: 4 Function Functions Plotting the R
- Page 116 and 117: 4 Function Functions The number of
- Page 118 and 119: 4 Function Functions and displays t
- Page 120 and 121: 4 Function Functions end function s
- Page 122 and 123: 4 Function Functions States of the
- Page 124 and 125: 4 Function Functions 100 80 60 40 2
- Page 126 and 127: 4 Function Functions You can verify
Interpolation<br />
enclosing triangle for the point (211.32, -48.35) to obtain the coordinates <strong>of</strong><br />
the vertices <strong>of</strong> the triangle:<br />
xi = 211.32; yi = -48.35;<br />
t = tsearch(x,y,tri,xi,yi);<br />
r = tri(t,:);<br />
A = [x(r) y(r)]<br />
A =<br />
211.3000 -48.3000<br />
211.3400 -48.3700<br />
211.2800 -48.3200<br />
Voronoi Diagrams<br />
Voronoi diagrams are a closest-point plotting technique related to Delaunay<br />
triangulation.<br />
For each point in a set <strong>of</strong> coplanar points, you can draw a polygon that encloses<br />
all the intermediate points that are closer to that point than to any other point<br />
in the set. Such a polygon is called a Voronoi polygon, and the set <strong>of</strong> all Voronoi<br />
polygons for a given point set is called a Voronoi diagram.<br />
The voronoi function can plot the cells <strong>of</strong> the Voronoi diagram, or return the<br />
vertices <strong>of</strong> the edges <strong>of</strong> the diagram. This example loads the seamount data,<br />
then uses the voronoi function to produce the Voronoi diagram for the<br />
longitudinal (x) and latitudinal (y) dimensions. Note that voronoi plots only<br />
the bounded cells <strong>of</strong> the Voronoi diagram:<br />
load seamount<br />
voronoi(x,y)<br />
grid on<br />
xlabel('Longitude'), ylabel('Latitude')<br />
2-25