Path: news.mathworks.com!not-for-mail
From: "Ender " <jr147@msstate.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: eigen values equation
Date: Fri, 19 Feb 2010 19:28:06 +0000 (UTC)
Organization: Mississippi State University
Lines: 57
Message-ID: <hlmoo6$eqe$1@fred.mathworks.com>
References: <hlmelk$jd9$1@fred.mathworks.com> <hlml7p$rgm$1@fred.mathworks.com>
Reply-To: "Ender " <jr147@msstate.edu>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1266607686 15182 172.30.248.37 (19 Feb 2010 19:28:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 19 Feb 2010 19:28:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1035766
Xref: news.mathworks.com comp.soft-sys.matlab:609838

I don't quite understand what you are saying here:

> For s = solve(eq), you can take each solution and substitute lambda = 0 
> with the subs command to get your "variable."

Also, MATLAB did not factor the equation in the form that I am looking for. After typing in eq2 MATLAB outputs:

eq2 =
 
-1/8*lamda*(8*lamda^2-5)

That is not the form that I am looking for. Also, whenever I type lamda = 0 then type in any of my equations MATLAB does not give me the results minus the lamda variable

--Ender--

Alan Weiss <aweiss@mathworks.com> wrote in message <hlml7p$rgm$1@fred.mathworks.com>...
> Ender wrote:
> > I have a coding problem that I need help with.
> > 
> > I am trying to write code that displays the value of a determinant with 
> > eigen values but I need all the equation as simplified as possible then 
> > I need MATLAB to store the value of the constant in that equation in a 
> > variable.
> > 
> > Here is my example:
> > 
> > syms lamda
> > 
> > % Make the identity matrix
> > Ident_matrix = lamda*eye(3);
> > 
> > A = [0,-.75,0;-0.75,0,0.25;0,0.25,0];
> > 
> > Result = A-Ident_matrix;
> > 
> > % Find the rho(T-j) value
> > 
> > eq = det(Result)
> > 
> > The form that I want is:
> > -lamda*(lamda^2-0.625)
> > 
> > Then I would like MATLAB to store the 0.625 in a variable.
> > 
> > I am not sure where in the help menu to go to figure out how to do this. 
> > --Ender--
> 
> You are really close. See what happens with the following statements:
> s = solve(eq)
> and
> eq2 = factor(eq)
> 
> For s = solve(eq), you can take each solution and substitute lambda = 0 
> with the subs command to get your "variable."
> 
> Alan Weiss
> MATLAB mathematical toolbox documentation