{"id":452,"date":"2015-04-23T18:24:14","date_gmt":"2015-04-23T09:24:14","guid":{"rendered":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/?p=452"},"modified":"2016-07-07T23:38:51","modified_gmt":"2016-07-07T14:38:51","slug":"%e3%83%a1%e3%83%a2matlab","status":"publish","type":"post","link":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/?p=452","title":{"rendered":"[Matlab]\u3000\u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u30e1\u30e2"},"content":{"rendered":"<p>[:ja]<\/p>\n<p>Matlab\u306e\u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u306e\u30e1\u30e2\uff0e<\/p>\n<p><!--more--><\/p>\n<p>\u5909\u6570\u306e\u6d88\u53bb\uff1aclear \u5909\u6570\u540d<br \/>\n M\u30d5\u30a1\u30a4\u30eb\u306e\u6d88\u53bb\uff1adelete \u30d5\u30a1\u30a4\u30eb\u540d<br \/>\n \u884c\u5217A\u5185\u306e1\u5217\u76ee\u3092\u6307\u5b9a\uff1aA(:,1)<br \/>\n \u884c\u5217A\u306e1\u5217\u76ee\u306e\u9577\u3055\u3092\u53d6\u5f97\uff1alength(A(:,1))<br \/>\n \u914d\u5217A\u3092\u4e00\u6b21\u5143\u7e26\u30d9\u30af\u30c8\u30eb\u306b\u5909\u63db\uff1aA(:)<br \/>\n \u6587\u5b57\u3068\u3057\u3066\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u5165\u529b\uff1a&#8221;<br \/>\n \u5909\u6570A\u3092\u8868\u793a\uff1adisp(A)<br \/>\n \u6587\u5b57\u3068\u5909\u6570\u3092\u6df7\u5728\u3055\u305b\u3066\u8868\u793a\uff1adisp([&#8216;A\u306e\u5024\u306f&#8217;,num2str(A),&#8217;\u3067\u3059&#8217;])<br \/>\n x \u306b\u5bfe\u3059\u308b\u7dda\u5f62\u65b9\u7a0b\u5f0f xA = B \u306e\u6c42\u89e3\uff1ax=B\/A\u3000\u3082\u3057\u304f\u306fx = mrdivide(B,A) \u203bA\u304c\u6b63\u65b9\u884c\u5217\u3067\u306a\u3044\u5834\u5408\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3067\u8a08\u7b97\u3055\u308c\u308b<br \/>\n x \u306b\u5bfe\u3059\u308b\u7dda\u5f62\u65b9\u7a0b\u5f0f Ax = B \u306e\u6c42\u89e3\uff1ax=A\\B \u3082\u3057\u304f\u306fx = mldivide(A,B) \u203bA\u304c\u6b63\u65b9\u884c\u5217\u3067\u306a\u3044\u5834\u5408\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3067\u8a08\u7b97\u3055\u308c\u308b<br \/>\n \u5ea7\u6a19(x1,y1)\u304b\u3089(x2,y2)\u3001\u307e\u305f(x2,y2)\u304b\u3089(x3,y3)\u307e\u3067\u76f4\u7dda\u3092\u5f15\u304f\uff1aplot([x1,x2],[y1,y2],[x2,x3],[y2,y3])\u3000\u3082\u3057\u304f\u306f plot([x1,x2;x2,x3],[y1,y2;y2,y3]) \u3082\u3057\u304f\u306fplot([x1,x2,x3],[y1,y2,y3])\u3082\u3057\u304f\u306fA=[x1,x2,x3;y1,y2,3];plot(A(1,:),A(2,:))<br \/>\n \u4e0a\u8a18\u3067\u5f15\u3044\u305f\u76f4\u7dda\u306ex\u5ea7\u6a19\u306b1\u3092\u8db3\u3057\u305f\u76f4\u7dda\u3092\u5f15\u304f\u5834\u5408\uff1aA=[x1,x2,x3;y1,y2,3];plot(A(1,:)+1,A(2,:))<\/p>\n<p>\u30b0\u30e9\u30d5\u95a2\u9023<br \/>\n \u8ef8\u3092\u6d88\u3059\uff1aaxis off<br \/>\n \u8ef8\u306e\u9577\u3055\u3092\u7d71\u4e00\u3059\u308b\uff1aaxis square<br \/>\n \u8ef8\u306e\u30b9\u30b1\u30fc\u30eb\u3092\u63c3\u3048\u308b\uff1aaxis equal<br \/>\n \u8ef8\u3092\u30c7\u30fc\u30bf\u306e\u6700\u5927\u6700\u5c0f\u306b\u5408\u308f\u305b\u308b\uff1aaxis tight<\/p>\n<p>[:en]\u5909\u6570\u306e\u6d88\u53bb\uff1aclear \u5909\u6570\u540d<br \/>\nM\u30d5\u30a1\u30a4\u30eb\u306e\u6d88\u53bb\uff1adelete \u30d5\u30a1\u30a4\u30eb\u540d<br \/>\n\u884c\u5217A\u5185\u306e1\u5217\u76ee\u3092\u6307\u5b9a\uff1aA(:,1)<br \/>\n\u884c\u5217A\u306e1\u5217\u76ee\u306e\u9577\u3055\u3092\u53d6\u5f97\uff1alength(A(:,1))<br \/>\n\u914d\u5217A\u3092\u4e00\u6b21\u5143\u7e26\u30d9\u30af\u30c8\u30eb\u306b\u5909\u63db\uff1aA(:)<br \/>\n\u6587\u5b57\u3068\u3057\u3066\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u5165\u529b\uff1a&#8221;<br \/>\n\u5909\u6570A\u3092\u8868\u793a\uff1adisp(A)<br \/>\n\u6587\u5b57\u3068\u5909\u6570\u3092\u6df7\u5728\u3055\u305b\u3066\u8868\u793a\uff1adisp([&#8216;A\u306e\u5024\u306f&#8217;,num2str(A),&#8217;\u3067\u3059&#8217;])<br \/>\nx \u306b\u5bfe\u3059\u308b\u7dda\u5f62\u65b9\u7a0b\u5f0f xA = B \u306e\u6c42\u89e3\uff1ax=B\/A\u3000\u3082\u3057\u304f\u306fx = mrdivide(B,A) \u203bA\u304c\u6b63\u65b9\u884c\u5217\u3067\u306a\u3044\u5834\u5408\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3067\u8a08\u7b97\u3055\u308c\u308b<br \/>\nx \u306b\u5bfe\u3059\u308b\u7dda\u5f62\u65b9\u7a0b\u5f0f Ax = B \u306e\u6c42\u89e3\uff1ax=A\\B \u3082\u3057\u304f\u306fx = mldivide(A,B) \u203bA\u304c\u6b63\u65b9\u884c\u5217\u3067\u306a\u3044\u5834\u5408\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3067\u8a08\u7b97\u3055\u308c\u308b<br \/>\n\u5ea7\u6a19(x1,y1)\u304b\u3089(x2,y2)\u3001\u307e\u305f(x2,y2)\u304b\u3089(x3,y3)\u307e\u3067\u76f4\u7dda\u3092\u5f15\u304f\uff1aplot([x1,x2],[y1,y2],[x2,x3],[y2,y3])\u3000\u3082\u3057\u304f\u306f plot([x1,x2;x2,x3],[y1,y2;y2,y3]) \u3082\u3057\u304f\u306fplot([x1,x2,x3],[y1,y2,y3])\u3082\u3057\u304f\u306fA=[x1,x2,x3;y1,y2,3];plot(A(1,:),A(2,:))<br \/>\n\u4e0a\u8a18\u3067\u5f15\u3044\u305f\u76f4\u7dda\u306ex\u5ea7\u6a19\u306b1\u3092\u8db3\u3057\u305f\u76f4\u7dda\u3092\u5f15\u304f\u5834\u5408\uff1aA=[x1,x2,x3;y1,y2,3];plot(A(1,:)+1,A(2,:))<\/p>\n<p>\u30b0\u30e9\u30d5\u95a2\u9023<br \/>\n\u8ef8\u3092\u6d88\u3059\uff1aaxis off<br \/>\n\u8ef8\u306e\u9577\u3055\u3092\u7d71\u4e00\u3059\u308b\uff1aaxis square<br \/>\n\u8ef8\u306e\u30b9\u30b1\u30fc\u30eb\u3092\u63c3\u3048\u308b\uff1aaxis equal<br \/>\n\u8ef8\u3092\u30c7\u30fc\u30bf\u306e\u6700\u5927\u6700\u5c0f\u306b\u5408\u308f\u305b\u308b\uff1aaxis tight[:]<\/p>\n","protected":false},"excerpt":{"rendered":"[:ja] Matlab\u306e\u57fa\u672c\u7684\u306a\u30b3\u30de\u30f3\u30c9\u306e\u30e1\u30e2\uff0e","protected":false},"author":1,"featured_media":1074,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[32],"tags":[21],"_links":{"self":[{"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=\/wp\/v2\/posts\/452"}],"collection":[{"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=452"}],"version-history":[{"count":4,"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=\/wp\/v2\/posts\/452\/revisions"}],"predecessor-version":[{"id":1116,"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=\/wp\/v2\/posts\/452\/revisions\/1116"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=\/wp\/v2\/media\/1074"}],"wp:attachment":[{"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ams.eng.osaka-u.ac.jp\/user\/ishihara\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}