w - value

19 views (last 30 days)
palash de
palash de on 4 Jan 2012
Please help me...., i have a problem related to mathematics .....,
0.9987λ^4 -0.0013*w*λ^3 -(1.44+0.0007*w^2)* λ² -1.4311*w*λ-0.8*w^2=0 Equation no(1).
the above equation is a fourth order polynomial equation and a determinant matrix=0.
det[1 1 1 1; exp(i*lemda(1)) exp(i*lemda(2)) exp(i*lemda(3)) exp(i*lemda(4));-(lemda(1))^2 -(lemda(2))^2 -(lemda(3))^2 -(lemda(4))^2;-(lemda(1))^2*exp(i*lemda(1)) -(lemda(2))^2*exp(i*lemda(2)) -(lemda(3))^2*exp(i*lemda(3)) -(lemda(4))^2*exp(i*lemda(4));]=0. Equation no(2).
By combining equation (1) and (2) five unknown quantities of λ (1,2,3,4) and ‘w’ can be solved. If we put the value of ‘w’ in the equation (1) we can able to get the four roots of lambda because the equation (1) is fourth order polynomial equation and if we put four values of lambda in determinant matrix then the result becomes zero. Here the value of ‘w’ infinite number by which the determinant becomes zero but I want only first three values of ‘w’ where determinant gives zero as a result and these are the values of ‘w’ which I required. I have tried to solve this problem in matlab software using Mfile. program is running but the problem is the program is not getting stop and for this reason I am not able to get the vales of ‘w’ in work space.
and adding matlab coding which i tried...., please check my coding...,
syms w;
w=1;
A=[0.9987 -0.0013*w -(1.44+0.0007*w^2) -1.4311*w -0.8*w^2]; lemda=roots(A);
q=[1 1 1 1; exp(i*lemda(1)) exp(i*lemda(2)) exp(i*lemda(3)) exp(i*lemda(4));-(lemda(1))^2 -(lemda(2))^2 -(lemda(3))^2 -(lemda(4))^2;-(lemda(1))^2*exp(i*lemda(1)) -(lemda(2))^2*exp(i*lemda(2)) -(lemda(3))^2*exp(i*lemda(3)) -(lemda(4))^2*exp(i*lemda(4));]
D=det(q);
while D~=0;
w=w+0.01;
A=[0.9987 -0.0013*w -(1.44+0.0007*w^2) -1.4311*w -0.8*w^2]; lemda=roots(A);
q=[1 1 1 1; exp(i*lemda(1)) exp(i*lemda(2)) exp(i*lemda(3)) exp(i*lemda(4));-(lemda(1))^2 -(lemda(2))^2 -(lemda(3))^2 -(lemda(4))^2;-(lemda(1))^2*exp(i*lemda(1)) -(lemda(2))^2*exp(i*lemda(2)) -(lemda(3))^2*exp(i*lemda(3)) -(lemda(4))^2*exp(i*lemda(4));]
D=det(q);
for j=1:1000;
i=1:1:3;
w(i)=w;
if D==0;
break
end
end
end
i am waiting for your answers..thank you.
  2 Comments
palash de
palash de on 4 Jan 2012
please help me ...please....
Jan
Jan on 4 Jan 2012
@Palash de: Instead of the "please", it would be more efficient to consider the recommendations given already in your former question: http://www.mathworks.com/matlabcentral/answers/24050-w-value
Please do not post mutliple threads for one question. Reacting to answers is recommended also.

Sign in to comment.

Answers (1)

Andrew Newell
Andrew Newell on 4 Jan 2012
Here is a numerical solution. First, create the file polyDet.m with the following code in it:
function out = polyDet(x)
%Function to calculate output of determinant and polynomials
x = x(:).';
w = x(1);
lambda = x(2:end);
out = zeros(length(x),1);
% This is a more compact representation of your matrix
q=[1 1 1 1;
exp(1i*lambda);
-lambda.^2;
-lambda.^2.*exp(1i*lambda)];
out(1) = det(q);
% Rest of output is calculations of the polynomial for each value of lambda
p = [0.9987 -0.0013*w -(1.44+0.0007*w^2) -1.4311*w -0.8*w^2];
for ii=2:length(x)
out(ii) = polyval(p,lambda(ii-1));
end
Then solve as follows:
x = fsolve(@polyDet,ones(5,1))
w = x(1);
lambda = x(2:end);

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!