tailieunhanh - Advanced Mathematics and Mechanics Applications Using MATLAB phần 2

Chức năng này đánh giá các phái sinh% đầu tiên hoặc thứ hai của đường cong piecewise% xác định khối nội suy spline% chức năng nội tại cung cấp trong ít hơn so với bốn điểm dữ liệu được nhập vào, sau đó đơn giản% nội suy đa thức được sử dụng%% xd | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 R2 real u2 imag u2 z2 Get curve properties from crvprp3d T N B kappa crvprp3d R1 R2 function val splined xd yd x if2 val splined xd yd x if2 ----------------------- This function evaluates the first or second derivative of the piecewise cubic interpolation curve defined by the intrinsic function spline provided in fewer than four data points are input then simple polynomial interpolation is employed xd yd - data vectors determining the spline curve produced by function spline x - vector of values where the first or the second derivative are desired if2 - a parameter which is input only if y x is required. Otherwise y x is returned. val - the first or second derivative values for the spline User m functions called none n length xd b c unmkpp spline xd yd if n 3 Use a cubic spline if nargin 3 c 3 c 1 2 c 2 c 3 else c 6 c 1 2 c 2 end val ppval mkpp b c x else Use a simple polynomial c polyder polyfit xd yd n-1 if nargin 4 c polyder c end val polyval c x end 2003 by CRC Press LLC 221 function range cubrange xyz ovrsiz 222 See Appendix B Surface Properties Surfaces are two-dimensional regions described parametrically as R u v ix u v 3u u v kz u v where u and v are scalar parameters. This parametric form is helpful for generating a grid of points on the surface as well as for computing surface tangents and the surface normal. Holding v fixed while u varies generates a curve in the surface called a u coordinate line. A tangent vector to the u-line is given by _dR _ dx t dy ĩ dz gu du du 3 di k du Similarly holding u fixed and varying v produces a v-line with tangent vector _ dR _ dx dy dz 9v dv dv 3 dv k dv Consider the following cross product. gu X gv dudv n dS. In this equation n is the unit surface normal and dS is the area of a parallelogram shaped surface element having .

TỪ KHÓA LIÊN QUAN