{"id":430,"date":"2017-09-14T12:18:30","date_gmt":"2017-09-14T15:18:30","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=430"},"modified":"2017-09-14T12:18:30","modified_gmt":"2017-09-14T15:18:30","slug":"splv-m","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/splv-m\/","title":{"rendered":"splv.m"},"content":{"rendered":"<pre>function x = splv(A, b)\r\n\r\n% splv  The solution to a square, invertible system.\r\n% x = splv(A, b) uses the PA = LU factorization\r\n% computed by splu to solve Ax = b.\r\n%\r\n% See also slv, splu, slash.\r\n\r\n[P, L, U] = splu(A);\r\n[n, n] = size(A);\r\n\r\n% Permute the right hand side.\r\nb = P*b;\r\n         \r\n% Forward elimination to solve L*c = b.\r\nc = zeros(n, 1);\r\nfor k = 1:n\r\n  s = 0;\r\n  for j = 1:k-1\r\n    s = s + L(k, j)*c(j);\r\n  end\r\n  c(k) = b(k) - s;\r\nend\r\n\r\n% Back substitution to solve U*x = c.\r\nx = zeros(n, 1);\r\nfor k = n:-1:1\r\n  t = 0;\r\n  for j = k+1:n\r\n    t = t + U(k, j)*x(j);\r\n  end\r\n  x(k) = (c(k) - t) \/ U(k, k);\r\nend<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>function x = splv(A, b) % splv The solution to a square, invertible system. % x = splv(A, b) uses the PA = LU factorization % computed by splu to solve Ax = b. % % See also slv, splu, slash. [P, L, U] = splu(A); [n, n] = size(A); % Permute the right hand [&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-430","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/430","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=430"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/430\/revisions"}],"predecessor-version":[{"id":431,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/430\/revisions\/431"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}