{"id":379,"date":"2017-09-14T12:02:20","date_gmt":"2017-09-14T15:02:20","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=379"},"modified":"2017-09-14T12:02:20","modified_gmt":"2017-09-14T15:02:20","slug":"eigvec-m","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/eigvec-m\/","title":{"rendered":"eigvec.m"},"content":{"rendered":"<pre>function [S, D] = eigvec(A)\r\n\r\n% eigvec  Eigenvectors and their geometric multiplicity.\r\n%\r\n% S = eigvec(A) returns the largest possible set of linearly\r\n% independent eigenvectors of A. \r\n%\r\n% [S, D] = eigvec(A) also returns the corresponding eigenvalues\r\n% in the diagonal matrix D.\r\n% Each eigenvalue in D is repeated according to the number of its\r\n% linearly independent eigenvectors. This is its geometric multiplicity.\r\n%\r\n% Always A*S = S*D. If S is square then A is diagonalizable and\r\n% inv(S)*A*S = D = LAMBDA.\r\n\r\n[m, n] = size(A);\r\nI = eye(n);\r\n[evalues, repeats] = eigval(A);\r\nS = []; d = [];\r\nfor k = 1 : length(evalues);\r\n  s = nulbasis(A - evalues(k)*I);\r\n  [ms, ns] = size(s);\r\n  S = [S s];\r\n  temp = ones(ns, 1) * evalues(k);\r\n  d = [d; temp];\r\nend\r\nD = diag(d);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>function [S, D] = eigvec(A) % eigvec Eigenvectors and their geometric multiplicity. % % S = eigvec(A) returns the largest possible set of linearly % independent eigenvectors of A. % % [S, D] = eigvec(A) also returns the corresponding eigenvalues % in the diagonal matrix D. % Each eigenvalue in D is repeated according to [&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-379","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/379","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=379"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/379\/revisions"}],"predecessor-version":[{"id":380,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/379\/revisions\/380"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}