{"id":400,"date":"2017-09-14T12:09:14","date_gmt":"2017-09-14T15:09:14","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=400"},"modified":"2017-09-14T12:09:14","modified_gmt":"2017-09-14T15:09:14","slug":"nulbasis-m","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/nulbasis-m\/","title":{"rendered":"nulbasis.m"},"content":{"rendered":"<pre>function N = nulbasis(A)\r\n\r\n% nulbasis  Basis for nullspace.\r\n%\r\n% N = nulbasis(A) returns a basis for the nullspace of A\r\n% in the columns of N. The basis contains the n-r special \r\n% solutions to Ax=0.  freecol is the list of free columns.\r\n%\r\n% Example:\r\n%\r\n% &gt;&gt; A = [1 2 0 3;\r\n%        [0 0 1 4];\r\n%\r\n% &gt;&gt; N = nulbasis(A)\r\n%\r\n%    N = [-2  -3]   \r\n%        [ 1   0]\r\n%        [ 0  -4]\r\n%        [ 0   1]\r\n%\r\n% See also fourbase.\r\n\r\n[R, pivcol] = rref(A, sqrt(eps));\r\n[m, n] = size(A);\r\nr = length(pivcol);\r\nfreecol = 1:n;\r\nfreecol(pivcol) = [];\r\nN = zeros(n, n-r);\r\nN(freecol, : ) = eye(n-r);\r\nN(pivcol,  : ) = -R(1:r, freecol);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>function N = nulbasis(A) % nulbasis Basis for nullspace. % % N = nulbasis(A) returns a basis for the nullspace of A % in the columns of N. The basis contains the n-r special % solutions to Ax=0. freecol is the list of free columns. % % Example: % % &gt;&gt; A = [1 2 [&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-400","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/400","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=400"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/400\/revisions"}],"predecessor-version":[{"id":401,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/400\/revisions\/401"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}