{"id":5087,"date":"2017-12-12T06:40:10","date_gmt":"2017-12-11T21:40:10","guid":{"rendered":"http:\/\/stuffy.dip.jp\/wordpress\/?p=5087"},"modified":"2017-12-12T06:40:10","modified_gmt":"2017-12-11T21:40:10","slug":"multiplication-which-also-understood-by-elementary-school-teacher","status":"publish","type":"post","link":"https:\/\/www.stuffy.site\/wordpress\/?p=5087","title":{"rendered":"\u5c0f\u5b66\u6821\u306e\u5148\u751f\u3092\u5fd6\u5ea6\u3057\u305f\u639b\u3051\u7b97"},"content":{"rendered":"<p>\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u8db3\u3057\u7b97\u306e\u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u3066\u4e57\u7b97\u306e\u6f14\u7b97\u5b50\u3092\u4f7f\u308f\u305a\u306b\u639b\u3051\u7b97\u306e\u7d50\u679c\u3092\u683c\u7d0d\u3059\u308b\u70b9\u3067\u3059\u3002<\/p>\n<pre><span style=\"font-size: 10pt;\">for (k=1; k &lt;= j; k += 1) {     \/\/ i+i+\u30fb\u30fb\u30fb+i \u3092j\u56de\u7e70\u308a\u8fd4\u3059\u30eb\u30fc\u30d7\n\u3000\u3000\u3000\u3000mat[i][j] += i;\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\/\/ \u914d\u5217\u306b\u683c\u7d0d\n}\n<\/span><\/pre>\n<p><a href=\"https:\/\/stuffy.mydns.jp\/~gusachan\/javascript\/multiplicativeMatrix.html\">https:\/\/stuffy.mydns.jp\/~gusachan\/javascript\/multiplicativeMatrix.html<\/a><\/p>\n<pre><span style=\"font-size: 9pt;\">\/\/ (m x n)\u306e2\u6b21\u5143\u914d\u5217\u3092\u5b9a\u7fa9\n\nArray.matrix = function (m, n, initial) {\n    var a, i, j, mat = [];\n      for (i=1; i &lt; m; i += 1) {\n        a = [];\n        for (j = 0; j &lt; n; j += 1) {\n          a[j] = initial;\n        }\n        mat[i] = a;\n      }\n      return mat;\n}\n\n\/\/ \u30bc\u30ed\u3067\u57cb\u3081\u3089\u308c\u305f 10 X 10 \u306e\u884c\u5217\u3092\u751f\u6210\u3059\u308b\n\nvar myMatrix = Array.matrix(10, 10, 0);\n\n\/\/ \u914d\u5217\u306b\u30eb\u30fc\u30d7\u3067\u4e5d\u4e5d\u306e\u8a08\u7b97\u7d50\u679c\u3092\u5165\u529b\u3059\u308b\n\nArray.multiplicative = function (n) {\n    var i, j, mat = Array.matrix(n, n, 0);\n    for (i=1; i &lt; n; i += 1) {\n      for (j=1; j &lt; n; j += 1) {\n        for (k=1; k &lt;= j; k += 1) {        \/\/ i+i+\u30fb\u30fb\u30fb+i \u3092j\u56de\u7e70\u308a\u8fd4\u3059\u30eb\u30fc\u30d7\n          mat[i][j] += i;\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\/\/ \u914d\u5217\u306b\u683c\u7d0d\n        }\n        mat[i][j] = i +\" \u00d7\" +  j + \" =\" + mat[i][j]  k\u30eb\u30fc\u30d7\u5916\u3067\u51fa\u529b\n      }\n    }\n    return mat;\n};\n\nmyMatrix = Array.multiplicative(10);\n\n\/\/ \u751f\u6210\u3055\u308c\u305f\u884c\u5217\u3092\u66f8\u304d\u51fa\u3059\u30e1\u30bd\u30c3\u30c9\n\nArray.output = function (m, n) {\n  window.onload = function() {\n    var mat = Array.multiplicative(n);\n    var divId = document.getElementById('result');\n    var table = document.createElement('table');\n    divId.appendChild(table);\n    var tbody = document.createElement('tbody');\n    table.appendChild(tbody);\n    for (var i = 1; i &lt; m; i++) {\n      var tr = document.createElement('tr');\n      for (var j = 1; j &lt; n; j++) {\n        var td = document.createElement('td');\n        td.innerHTML = myMatrix[i][j];\n        tr.appendChild(td);\n      }\n      tbody.appendChild(tr);\n    }\n    return mat;\n  }\n};\n\nprintMatrix = Array.output(10,10);<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u8db3\u3057\u7b97\u306e\u30eb\u30fc\u30d7\u3092\u4f7f\u3063\u3066\u4e57\u7b97\u306e\u6f14\u7b97\u5b50\u3092\u4f7f\u308f\u305a\u306b\u639b\u3051\u7b97\u306e\u7d50\u679c\u3092\u683c\u7d0d\u3059\u308b\u70b9\u3067\u3059\u3002 for (k=1; k &lt;= j; k += 1) { \/\/ i+i+\u30fb\u30fb\u30fb+i \u3092j\u56de\u7e70\u308a\u8fd4\u3059\u30eb\u30fc\u30d7 \u3000\u3000\u3000\u3000mat[i][ &hellip; <a href=\"https:\/\/www.stuffy.site\/wordpress\/?p=5087\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u5c0f\u5b66\u6821\u306e\u5148\u751f\u3092\u5fd6\u5ea6\u3057\u305f\u639b\u3051\u7b97<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87,5],"tags":[],"class_list":["post-5087","post","type-post","status-publish","format-standard","hentry","category-javascript","category-software"],"_links":{"self":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5087"}],"version-history":[{"count":0,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5087\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}