{"id":4747,"date":"2025-03-31T13:42:15","date_gmt":"2025-03-31T04:42:15","guid":{"rendered":"https:\/\/www.ktech.biz\/jp\/?p=4747"},"modified":"2025-05-05T13:21:24","modified_gmt":"2025-05-05T04:21:24","slug":"5-int","status":"publish","type":"post","link":"https:\/\/www.ktech.biz\/jp\/tutorial\/5-int\/","title":{"rendered":"5. \u88dc\u9593"},"content":{"rendered":"\n<h3>5.1 \u6982\u8981<\/h3>\n<p>\u88dc\u9593\u6cd5\u306f\u3057\u3070\u3057\u3070\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3068\u6df7\u540c\u3055\u308c\u307e\u3059. \u6700\u5c0f\u4e8c\u4e57\u6cd5\u3067\u306f\u30c7\u30fc\u30bf\u70b9\u306b\u8aa4\u5dee\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057, \u8fd1\u4f3c\u5f0f\u306f\u3074\u3063\u305f\u308a\u30c7\u30fc\u30bf\u70b9\u3092\u901a\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093. \u3057\u304b\u3057, \u88dc\u9593\u6cd5\u306f\u8aa4\u5dee\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u30c7\u30fc\u30bf\u70b9\u3092\u6ed1\u3089\u304b\u306b\u3064\u306a\u3050\u65b9\u6cd5\u3067, \u88dc\u9593\u5f0f\u306f\u3074\u3063\u305f\u308a\u5168\u30c7\u30fc\u30bf\u70b9\u3092\u901a\u308a\u307e\u3059. \u30c7\u30fc\u30bf\u70b9\u306b\u8aa4\u5dee\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3068\u4e0d\u81ea\u7136\u306b\u66f2\u304c\u3063\u305f\u88dc\u9593\u66f2\u7dda\u304c\u5f97\u3089\u308c\u3066\u3057\u307e\u3044\u307e\u3059.<\/p>\n<p>\u3044\u308d\u3044\u308d\u306a\u95a2\u6570\u5024\u3092\u8868\u306b\u3057\u305f\u6570\u8868\u3068\u3044\u3046\u306e\u304c\u3042\u308a\u307e\u3059. \u3053\u308c\u3092\u4f7f\u3046\u969b\u306b, \u8868\u306b\u306e\u3063\u3066\u3044\u306a\u3044\u70b9\u306e\u5024\u3092\u6c42\u3081\u308b\u305f\u3081\u306b\u88dc\u9593 (\u5185\u633f) \u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3057\u305f. \u73fe\u5728\u3067\u306f\u95a2\u6570\u96fb\u5353\u3084\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u3042\u308b\u305f\u3081\u305d\u306e\u9700\u8981\u306f\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u304c, \u4f8b\u3048\u3070, 1 \u70b9\u3092\u8a08\u7b97\u3059\u308b\u306e\u306b\u591a\u5927\u306a\u52b4\u529b(\u8a08\u7b97\u6642\u9593)\u304c\u5fc5\u8981\u306a\u95a2\u6570\u306e\u5024\u3092\u7d20\u65e9\u304f\u6c42\u3081\u305f\u3044\u5834\u5408\u306a\u3069\u306b\u73fe\u5728\u3067\u3082\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059.<\/p>\n<p>\u306a\u304a, \u898b\u3048\u306a\u3044\u3068\u3053\u308d\u3067\u6570\u5024\u89e3\u6cd5\u306e\u57fa\u76e4\u3068\u3057\u3066\u88dc\u9593\u6cd5\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059. \u4f8b\u3048\u3070, \u6570\u5024\u7a4d\u5206\u3067\u306f\u5206\u70b9\u306e\u88dc\u9593\u5f0f\u3092\u6c42\u3081\u3066\u88dc\u9593\u95a2\u6570\u3092\u7a4d\u5206\u3057\u305f\u95a2\u6570\u306e\u5024\u3092\u7a4d\u5206\u5024\u3068\u3057\u3066\u63a1\u7528\u3059\u308b\u65b9\u6cd5\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059.<\/p>\n<h3>5.2 \u88dc\u9593\u6cd5\u306e\u89e3\u6cd5<\/h3>\n<h4>5.2.1 \u591a\u9805\u5f0f\u88dc\u9593 (\u30e9\u30b0\u30e9\u30f3\u30b8\u30e5\u88dc\u9593)<\/h4>\n<p>\\(n\\) \u6b21\u591a\u9805\u5f0f \\(p_n(x)\\) \u3092\u6b21\u306e\u3088\u3046\u306b\u5b9a\u7fa9\u3057\u307e\u3059.<br \/>\n\\[<br \/>\np_n(x) = a_0x^n + a_1x^{n-1} +  \\dots + a_{n-1}x + a_n<br \/>\n\\]\n\u3053\u306e \\(p_n(x)\\) \u3067\u95a2\u6570 \\(f(x)\\) \u3092\u88dc\u9593\u3059\u308b\u3082\u306e\u3068\u3057\u307e\u3059.<\/p>\n<p>\\(n + 1\\) \u500b\u306e\u76f8\u7570\u306a\u308b\u70b9 \\(x_0, x_1, \\dots, x_n\\) \u306b\u304a\u3051\u308b\u95a2\u6570\u5024 \\(f(x_0), f(x_1), \\dots, f(x_n)\\) \u304c\u4e0e\u3048\u3089\u308c\u3066\u3044\u308c\u3070, \\((n + 1)\\)\u5143\u9023\u7acb\u4e00\u6b21\u65b9\u7a0b\u5f0f\u3092\u89e3\u304f\u3053\u3068\u306b\u3088\u308a \\(n + 1\\) \u500b\u306e\u4fc2\u6570 \\(a_0, a_1, \\dots, a_n\\) \u3092\u5b9a\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059.<\/p>\n<p>\u591a\u9805\u5f0f\u88dc\u9593\u3092\u884c\u3046\u306b\u306f, \u3053\u306e\u3088\u3046\u306b\u9023\u7acb\u4e00\u6b21\u65b9\u7a0b\u5f0f\u3092\u89e3\u3044\u3066\u591a\u9805\u5f0f\u306e\u4fc2\u6570\u3092\u76f4\u63a5\u6c42\u3081\u308b\u306e\u304c\u76f4\u89b3\u7684\u306a\u65b9\u6cd5\u3067\u3059\u304c, \u5b9f\u52d9\u7684\u306b\u306f\u65b9\u7a0b\u5f0f\u306e\u6761\u4ef6\u6570\u304c\u5927\u304d\u304f\u306a\u308a\u3084\u3059\u3044\u306a\u3069\u306e\u7406\u7531\u306b\u3088\u308a, \u7b49\u4fa1\u306a\u591a\u9805\u5f0f\u3067\u3042\u308b\u30e9\u30b0\u30e9\u30f3\u30b8\u30e5\u88dc\u9593\u516c\u5f0f\u304c\u7528\u3044\u3089\u308c\u307e\u3059.<\/p>\n<p>\u30e9\u30b0\u30e9\u30f3\u30b8\u30e5\u88dc\u9593\u516c\u5f0f\u306f\u6b21\u5f0f\u3067\u8868\u3055\u308c\u307e\u3059.<br \/>\n\\[<br \/>\nf(x) = \\sum_{k=0}^{n}L_k(x) f(x_k)<br \/>\n\\]\n\u305f\u3060\u3057<br \/>\n\\[<br \/>\nL_k(x) = \\prod_{i=0}^{n (i \\neq k)}(x &#8211; x_i)\/(x_k &#8211; x_i)<br \/>\n\\]\n\\(L_k(x_i)\\) \u306f \\(i = k\\) \u306e\u3068\u304d 1, \\(i \\neq k\\) \u306e\u3068\u304d 0 \u306b\u306a\u308a\u307e\u3059. \u3057\u305f\u304c\u3063\u3066, \u30e9\u30b0\u30e9\u30f3\u30b8\u30e5\u88dc\u9593\u516c\u5f0f\u306f\u5404\u6a19\u672c\u70b9\u306b\u304a\u3044\u3066\u4e0e\u3048\u3089\u308c\u305f\u30c7\u30fc\u30bf\u306b\u4e00\u81f4\u3057\u307e\u3059. \u307e\u305f, \u6a19\u672c\u70b9\u306e\u4e26\u3093\u3067\u3044\u308b\u9806\u5e8f\u306b\u95a2\u4fc2\u306a\u304f\u6210\u308a\u7acb\u3061, \u6a19\u672c\u70b9\u306f\u7b49\u9593\u9694\u306a\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093.<\/p>\n<p>\u30e9\u30b0\u30e9\u30f3\u30b8\u30e5\u88dc\u9593\u516c\u5f0f\u306f \\(n\\) \u6b21\u591a\u9805\u5f0f\u3067\u3042\u308a, \u30d0\u30e9\u30d0\u30e9\u306b\u3057\u3066\u6574\u7406\u3059\u308b\u3068\u305d\u306e\u4fc2\u6570\u306f\u9023\u7acb\u4e00\u6b21\u65b9\u7a0b\u5f0f\u3092\u89e3\u3044\u3066\u6c42\u3081\u305f\u591a\u9805\u5f0f\u306e\u4fc2\u6570\u3068\u4e00\u81f4\u3057\u307e\u3059. \u3057\u304b\u3057, \u88dc\u9593\u306b\u304a\u3044\u3066\u306f\u95a2\u6570\u5024\u304c\u6c42\u307e\u308c\u3070\u3088\u304f\u3066\u591a\u9805\u5f0f\u306e\u4fc2\u6570\u306f\u8a08\u7b97\u306b\u76f4\u63a5\u306f\u5fc5\u8981\u306a\u3044\u306e\u3067, \u3053\u306e\u5f62\u306e\u307e\u307e\u8a08\u7b97\u306b\u4f7f\u308f\u308c\u307e\u3059.<\/p>\n<h4>5.2.2 3\u6b21\u30b9\u30d7\u30e9\u30a4\u30f3\u88dc\u9593<\/h4>\n<p>\u5168\u4f53\u3092\u5c0f\u3055\u3044\u533a\u9593\u306b\u5206\u5272\u3057\u305d\u308c\u305e\u308c\u306e\u533a\u9593\u3067\u591a\u9805\u5f0f\u88dc\u9593\u3092\u884c\u3046\u65b9\u6cd5\u3092\u533a\u5206\u7684\u591a\u9805\u5f0f\u88dc\u9593\u3068\u3044\u3044\u307e\u3059. \u305d\u306e\u4e2d\u3067\u6700\u3082\u3088\u304f\u4f7f\u308f\u308c\u308b\u306e\u306f 3 \u6b21\u30b9\u30d7\u30e9\u30a4\u30f3\u88dc\u9593\u3067\u3059. \u9023\u7d9a\u3059\u308b\u30c7\u30fc\u30bf\u70b9\u306e\u7d44\u3092 3 \u6b21\u591a\u9805\u5f0f\u3067\u8fd1\u4f3c\u3057, \u3064\u306a\u304e\u76ee\u304c\u6ed1\u3089\u304b\u306b\u306a\u308b\u3088\u3046\u306b 2 \u6b21\u307e\u3067\u306e\u5c0e\u95a2\u6570\u304c\u9023\u7d9a\u306b\u306a\u308b\u3088\u3046\u306b\u69cb\u6210\u3055\u308c\u305f\u3082\u306e\u3067\u3059.<\/p>\n<p>\u30c7\u30fc\u30bf \\((x_1, y_1), (x_2, y_2), \\dots, (x_n, y_n)\\) \u304c\u4e0e\u3048\u3089\u308c\u3066\u3044\u308b\u3082\u306e\u3068\u3057\u307e\u3059. \u3053\u308c\u3089\u3092\u7bc0\u70b9\u3068\u3044\u3044\u307e\u3059. 3 \u6b21\u30b9\u30d7\u30e9\u30a4\u30f3\u306f, \u533a\u9593 \\([x_1, x_n]\\) \u306b\u304a\u3044\u3066, \u96a3\u308a\u5408\u3046\u7bc0\u70b9\u306e\u9593\u3067\u306f 3 \u6b21\u591a\u9805\u5f0f\u3067\u3042\u308a, \u96a3\u306e\u5c0f\u533a\u9593\u306e\u591a\u9805\u5f0f\u3068\u306f\u305d\u306e\u9593\u306e\u7bc0\u70b9\u3067 1 \u6b21\u3068 2 \u6b21\u5fae\u5206\u304c\u9023\u7d9a\u306b\u306a\u308a\u307e\u3059.<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a \\(n &#8211; 1\\) \u500b\u306e 3 \u6b21\u591a\u9805\u5f0f\u3092\u5b9a\u3081\u308b\u305f\u3081\u306b\u306f\u305d\u308c\u305e\u308c \\(4\\) \u500b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u3042\u308b\u306e\u3067, \u5168\u90e8\u3067 \\(4 \\times (n &#8211; 1)\\) \u500b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6c7a\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059. \u3053\u308c\u306b\u5bfe\u3057\u3066, \\(n\\) \u500b\u306e\u7bc0\u70b9\u3067 \\(y_i\\) \u306e\u5024\u304c\u6c7a\u3081\u3089\u308c\u3066\u3044\u308b\u304b\u3089 \\(n\\) \u500b, \u305d\u3057\u3066\u5185\u5074\u306e \\(n &#8211; 2\\) \u500b\u306e\u7bc0\u70b9\u306b\u304a\u3044\u3066\u95a2\u6570\u5024, 1 \u6b21\u5fae\u5206, 2 \u6b21\u5fae\u5206\u304c\u9023\u7d9a\u306b\u306a\u308b\u304b\u3089 \\(3 \\times (n &#8211; 2)\\) \u500b, \u5408\u308f\u305b\u3066 \\(4n &#8211; 6\\) \u500b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u6c7a\u307e\u308a, \u3042\u3068 \\(2\\) \u500b\u306e\u81ea\u7531\u5ea6\u304c\u3042\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059.<\/p>\n<p>\\(2\\) \u500b\u306e\u6761\u4ef6\u3068\u3057\u3066, \u4f8b\u3048\u3070 \\(x_1\\) \u304a\u3088\u3073 \\(x_n\\) \u306b\u304a\u3051\u308b\u5fae\u5206\u5024\u304c\u308f\u304b\u308c\u3070\u305d\u308c\u3092\u4f7f\u3046\u3068\u3088\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059. \u305d\u3046\u3067\u306a\u3051\u308c\u3070 \\(x_1\\) \u304a\u3088\u3073 \\(x_n\\) \u306b\u304a\u3051\u308b 2 \u6b21\u5fae\u5206\u5024\u3092 0 \u306b\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a, \u3053\u308c\u3092\u81ea\u7136\u30b9\u30d7\u30e9\u30a4\u30f3\u3068\u3044\u3044\u307e\u3059. \u307e\u305f, \\(x_1\\) \u304a\u3088\u3073 \\(x_n\\) \u306b\u304a\u3051\u308b 3 \u6b21\u5fae\u5206\u3092\u9023\u7d9a\u306b\u3059\u308b not-a-knot \u6761\u4ef6\u3068\u547c\u3070\u308c\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059.<\/p>\n<p>\u4ee5\u4e0a\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6c42\u3081\u308b\u3053\u3068\u306f, \u4fc2\u6570\u304c\u6b63\u5b9a\u5024\u5bfe\u79f0\u306a 3 \u91cd\u5bfe\u89d2\u884c\u5217\u306e\u9023\u7acb\u4e00\u6b21\u65b9\u7a0b\u5f0f\u3092\u89e3\u304f\u3053\u3068\u306b\u5e30\u7740\u3055\u308c\u307e\u3059.<\/p>\n<h3>5.3 XLPack \u3092\u4f7f\u3063\u305f\u88dc\u9593\u6cd5\u306e\u89e3\u304d\u65b9<\/h3>\n<p>3 \u6b21\u30b9\u30d7\u30e9\u30a4\u30f3\u88dc\u9593\u4fc2\u6570\u3092\u6c42\u3081\u308b\u305f\u3081\u306b <strong>Pchse<\/strong> \u3092, \u88dc\u9593\u5024\u3092\u6c42\u3081\u308b\u305f\u3081\u306b <strong>Pchfe<\/strong> \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059. \u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u95a2\u6570\u3067\u306f, \u305d\u308c\u305e\u308c <strong>WPchse<\/strong> \u3068 <strong>WPchfe<\/strong> \u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059.<\/p>\n<h5>\u4f8b\u984c: \u5bfe\u6570\u8868<\/h5>\n<p>\u4e0b\u8868\u306f\u81ea\u7136\u5bfe\u6570\u8868\u306e\u4e00\u90e8\u3092\u629c\u304d\u51fa\u3057\u305f\u3082\u306e\u3067\u3059.<br \/>\n<div class=\"su-table su-table-responsive su-table-alternate\">\n<table>\n<tr>\n<th>n<\/th>\n<th>ln(n)<\/th>\n<\/tr>\n<tr>\n<td>1.5<\/td>\n<td>0.405465108108164<\/td>\n<\/tr>\n<tr>\n<td>1.6<\/td>\n<td>0.470003629245736<\/td>\n<\/tr>\n<tr>\n<td>1.7<\/td>\n<td>0.53062825106217<\/td>\n<\/tr>\n<tr>\n<td>1.8<\/td>\n<td>0.587786664902119<\/td>\n<\/tr>\n<tr>\n<td>1.9<\/td>\n<td>0.641853886172395<\/td>\n<\/tr>\n<tr>\n<td>2.0<\/td>\n<td>0.693147180559945<\/td>\n<\/tr>\n<tr>\n<td>2.1<\/td>\n<td>0.741937344729377<\/td>\n<\/tr>\n<tr>\n<td>2.2<\/td>\n<td>0.78845736036427<\/td>\n<\/tr>\n<\/table>\n<\/div>\n\u3053\u3053\u3067, \u6570\u8868\u306b\u8f09\u3063\u3066\u3044\u306a\u3044\u5024, \u4f8b\u3048\u3070 \\(ln(1.85)\\) \u306a\u3069\u3092\u6c42\u3081\u305f\u3044\u3082\u306e\u3068\u3057\u307e\u3059.<\/p>\n<h4>5.3.1 \u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u95a2\u6570\u3092\u4f7f\u7528\u3057\u305f\u89e3\u304d\u65b9<\/h4>\n<p>\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u306e\u9069\u5f53\u306a\u5834\u6240\u306b\u30c7\u30fc\u30bf \\((x_i, y_i = ln(x_i))\\) \u3092\u5165\u529b\u3057\u307e\u3059(\u5de6\u306e\u30aa\u30ec\u30f3\u30b8\u8272\u306e\u30bb\u30eb). \u3053\u3053\u3067, \\(x_i\\) \u306f\u6607\u9806\u306b\u306a\u3063\u3066\u3044\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093. \u30b9\u30d7\u30e9\u30a4\u30f3\u88dc\u9593\u306b\u5fc5\u8981\u306a\u4fc2\u6570 \\(d_i\\) \u3092\u6c42\u3081\u308b\u305f\u3081\u306b\u30c7\u30fc\u30bf\u6570\u500b\u306e\u30bb\u30eb\u3092\u9078\u629e\u3057\u3066\u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u95a2\u6570 <strong>WPchse<\/strong> \u3092\u5165\u529b\u3057\u307e\u3059(\u5de6\u306e\u7dd1\u8272\u306e\u30bb\u30eb).<\/p>\n<p><strong>WPchse<\/strong> \u306e\u5fc5\u8981\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u306f N, X, Y \u3067\u3059. N \u306f\u30c7\u30fc\u30bf\u6570(\u3053\u306e\u4f8b\u3067\u306f 8), X \u3068 Y \u306f\u88dc\u9593\u3059\u308b\u30c7\u30fc\u30bf \\((x_i, y_i)\\) \u306e\u30bb\u30eb\u7bc4\u56f2\u3067\u3059.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_1.png\" alt=\"\" width=\"979\" height=\"786\" class=\"aligncenter size-full wp-image-4154\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_1.png 979w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_1-300x241.png 300w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_1-768x617.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p>\u5165\u529b\u304c\u7d42\u4e86\u3057\u305f\u3089 Ctrl + Shift + Enter \u3092\u62bc\u3057\u307e\u3059. \u3053\u308c\u3067, \u30b9\u30d7\u30e9\u30a4\u30f3\u88dc\u9593\u4fc2\u6570\u304c\u6c42\u3081\u3089\u308c\u307e\u3057\u305f.<\/p>\n<p>\u6b21\u306b, \u5225\u306e\u5834\u6240\u306b\u6c42\u3081\u305f\u3044\u70b9\u306e\u30c7\u30fc\u30bf(\u3053\u306e\u5834\u5408, \\(n = 1.55 \\sim 2.15\\))\u3092\u5165\u529b\u3057\u3066\u304a\u304d(\u53f3\u306e\u30aa\u30ec\u30f3\u30b8\u8272\u306e\u30bb\u30eb), \u305d\u3053\u306b\u304a\u3051\u308b\u95a2\u6570\u5024\u3092 <strong>WPchfe<\/strong> \u95a2\u6570\u3092\u4f7f\u3063\u3066\u6c42\u3081\u307e\u3059(\u53f3\u306e\u7dd1\u8272\u306e\u30bb\u30eb).<\/p>\n<p><strong>WPchfe<\/strong> \u306e\u5fc5\u8981\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u306f Ne, Xe, N, X, Y, D \u3067\u3059. Ne \u306f\u6c42\u3081\u305f\u3044\u70b9\u306e\u30c7\u30fc\u30bf\u6570(\u3053\u306e\u4f8b\u3067\u306f 7), Xe \u306f\u6c42\u3081\u305f\u3044\u70b9\u306e\u30c7\u30fc\u30bf\u306e\u30bb\u30eb\u7bc4\u56f2\u3067\u3059. N, X, Y \u306f\u88dc\u9593\u4fc2\u6570\u3092\u6c42\u3081\u305f\u3068\u304d\u306e <strong>WPchse<\/strong> \u306e\u5165\u529b\u30c7\u30fc\u30bf\u3068\u540c\u3058\u3067\u3059. D \u306f\u6c42\u3081\u3089\u308c\u305f\u88dc\u9593\u4fc2\u6570\u3067\u3059.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_2.png\" alt=\"\" width=\"979\" height=\"786\" class=\"aligncenter size-full wp-image-4155\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_2.png 979w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_2-300x241.png 300w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_2-768x617.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p>Ctrl + Shift + Enter \u3092\u62bc\u3059\u3068, \u8868\u306b\u8f09\u3063\u3066\u3044\u306a\u3044\u70b9\u306b\u304a\u3051\u308b\u81ea\u7136\u5bfe\u6570\u306e\u5024\u304c\u6c42\u3081\u3089\u308c\u307e\u3059. \u3053\u3053\u3067\u306f, \u8868\u306b\u8f09\u3063\u3066\u3044\u306a\u3044\u70b9\u3092\u4e38\u3067, \u6570\u8868\u306e\u5024\u3092\u76f4\u7dda\u3067\u8868\u3059\u30b0\u30e9\u30d5\u3082\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_3.png\" alt=\"\" width=\"979\" height=\"786\" class=\"aligncenter size-full wp-image-4157\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_3.png 979w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_3-300x241.png 300w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5W_3-768x617.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n<p>\u3053\u306e\u4f8b\u3067\u306f, \u30c7\u30fc\u30bf\u70b9\u306f\u7b49\u9593\u9694\u3067\u3057\u305f\u304c, \u5fc5\u305a\u3057\u3082\u7b49\u9593\u9694\u3067\u3042\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093. \u305f\u3060\u3057, \u9593\u9694\u304c\u5927\u304d\u304f\u7a7a\u3044\u3066\u3044\u308b\u533a\u9593\u306e\u88dc\u9593\u5024\u306f\u7cbe\u5ea6\u304c\u60aa\u304f\u306a\u308a\u307e\u3059. \u307e\u305f, \u30c7\u30fc\u30bf\u70b9\u306e\u7bc4\u56f2\u5916\u3067\u306e\u5024(\u5916\u633f\u5024)\u3092\u8a08\u7b97\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u7cbe\u5ea6\u306f\u843d\u3061\u307e\u3059.<\/p>\n<h4>5.3.2 VBA\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f7f\u7528\u3057\u305f\u89e3\u304d\u65b9<\/h4>\n<p>\u4e0a\u3068\u540c\u3058\u4f8b\u3092 VBA \u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3088\u308a\u89e3\u304d\u307e\u3059. <strong>Pchse<\/strong> \u304a\u3088\u3073 <strong>Pchfe<\/strong> \u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u4f8b\u3092\u793a\u3057\u307e\u3059.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-vb\" data-lang=\"VBA\"><code>Sub Start()\r\n    Const NMax = 10\r\n    Dim N As Long, Ne As Long, I As Long, Info As Long\r\n    Dim X(NMax) As Double, Y(NMax) As Double, D(NMax) As Double\r\n    Dim Xe(NMax) As Double, Fe(NMax) As Double\r\n    '--- Input data\r\n    N = 8\r\n    For I = 0 To N - 1\r\n        X(I) = Cells(5 + I, 1)\r\n        Y(I) = Cells(5 + I, 2)\r\n    Next\r\n    '--- Compute coefficients of a cubic spline\r\n    Call Pchse(N, X(), Y(), D(), Info)\r\n    If Info <> 0 Then\r\n        MsgBox \"** Error in Pchse **  Info = \" + Str(Info)\r\n        Exit Sub\r\n    End If\r\n    '--- Compute interporated values\r\n    Ne = N - 1\r\n    For I = 0 To Ne - 1\r\n        Xe(I) = Cells(5 + I, 4)\r\n    Next\r\n    Call Pchfe(N, X(), Y(), D(), Ne, Xe(), Fe(), Info)\r\n    If Info <> 0 Then\r\n        MsgBox \"** Error in Pchfe **  Info = \" + Str(Info)\r\n        Exit Sub\r\n    End If\r\n    '--- Output result\r\n    For I = 0 To Ne - 1\r\n        Cells(5 + I, 5) = Fe(I)\r\n    Next\r\nEnd Sub<\/code><\/pre>\n<\/div>\n<p>\u6240\u5b9a\u306e\u4f4d\u7f6e(\u4e0b\u306e\u30aa\u30ec\u30f3\u30b8\u8272\u306e\u30bb\u30eb)\u306b\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057, \u30de\u30af\u30ed Start \u3068\u3057\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u6b21\u306e\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059. \u30ef\u30fc\u30af\u30b7\u30fc\u30c8\u95a2\u6570\u3092\u4f7f\u7528\u3057\u305f\u3068\u304d\u3068\u7570\u306a\u308a, \u88dc\u9593\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3057\u305f\u3060\u3051\u3067\u306f\u7d50\u679c\u304c\u5f97\u3089\u308c\u305a, VBA \u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5_1.png\" alt=\"\" width=\"979\" height=\"786\" class=\"aligncenter size-full wp-image-4156\" srcset=\"https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5_1.png 979w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5_1-300x241.png 300w, https:\/\/www.ktech.biz\/jp\/wp-content\/uploads\/sites\/2\/2015\/10\/Ex5_1-768x617.png 768w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u88dc\u9593\u6cd5\u306e\u89e3\u6cd5\u3068XLPack\u3092\u4f7f\u3063\u305f\u89e3\u304d\u65b9<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-4747","post","type-post","status-publish","format-standard","hentry","category-tutorial"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/4747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/comments?post=4747"}],"version-history":[{"count":4,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/4747\/revisions"}],"predecessor-version":[{"id":5039,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/posts\/4747\/revisions\/5039"}],"wp:attachment":[{"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/media?parent=4747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/categories?post=4747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ktech.biz\/jp\/wp-json\/wp\/v2\/tags?post=4747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}