{"id":568,"date":"2017-09-14T13:40:13","date_gmt":"2017-09-14T16:40:13","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=568"},"modified":"2017-09-14T13:40:13","modified_gmt":"2017-09-14T16:40:13","slug":"matrix-out","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/matrix-out\/","title":{"rendered":"matrix.out"},"content":{"rendered":"<pre>&gt;&gt; a = [3 2 -1; -1 3 2; 1 -1 -1]                 % 'a' 3X3 coeff matrix\r\n\r\na =\r\n     3     2    -1\r\n    -1     3     2\r\n     1    -1    -1\r\n\r\n&gt;&gt; b = [ 10; 5; -1]\t\t\t\t % 'b' RHS (load) vector\r\n\r\nb =\r\n    10\r\n     5\r\n    -1\r\n\r\n&gt;&gt; x = a\\b                                       % from a * x = b, solve for x\r\n\r\nx =\r\n   -2.0000\r\n    5.0000\r\n   -6.0000\r\n\r\n&gt;&gt; a*x                                           % check that a * x = b\r\n\r\nans =\r\n   10.0000\r\n    5.0000\r\n   -1.0000\r\n\r\n&gt;&gt; inva = inv(a)                                 % determine inverse of 'a'\r\n\r\ninva =\r\n   -1.0000    3.0000    7.0000\r\n    1.0000   -2.0000   -5.0000\r\n   -2.0000    5.0000   11.0000\r\n\r\n&gt;&gt; inva * a                                      % check that inva * a = [I]\r\n\r\nans =\r\n    1.0000    0.0000    0.0000\r\n    0.0000    1.0000    0.0000\r\n    0.0000    0.0000    1.0000\r\n\r\n&gt;&gt; inva * b                                      % show that inva * b = x\r\n\r\nans =\r\n   -2.0000\r\n    5.0000\r\n   -6.0000\r\n\r\n&gt;&gt; a'                                            % transpose of 'a'\r\n\r\nans =\r\n     3    -1     1\r\n     2     3    -1\r\n    -1     2    -1\r\n\r\n&gt;&gt; cond(a)                                       % condition number of 'a'\r\n\r\nans =\r\n   63.0547<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&gt;&gt; a = [3 2 -1; -1 3 2; 1 -1 -1] % &#8216;a&#8217; 3X3 coeff matrix a = 3 2 -1 -1 3 2 1 -1 -1 &gt;&gt; b = [ 10; 5; -1] % &#8216;b&#8217; RHS (load) vector b = 10 5 -1 &gt;&gt; x = a\\b % from a * x = [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[],"tags":[],"class_list":["post-568","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/568","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/comments?post=568"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/568\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/568\/revisions\/569"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}