"zayed " <zaed...@Yahoo.com> wrote in message <jdq618$km9$
1...@newscl01ah.mathworks.com>...
> > > W=inv(M)+lambda*Q;
> > > ......
> > > y=-z'*inv(M)*inv(W)*Q*inv(W)*inv(M)*z;
> I would like to thank you Roger for your response . But I not sure a bout the initial value ,so I need help to plot the function in (a),so I can guess a good initial point.
> Also I can't represent the form in (b) in matlab,so I can try to solve it.
> Thanks
- - - - - - - -
As to plotting your 'y' as a function of 'lambda' we very much need to know whether 'y' is strictly real-valued or not. That is because a "plot" of a complex-valued variable as a function of another complex-valued variable would require a four-dimensional display and matlab has no such direct display capability. Instead you would have to use a 3D surface plot for the separate real and imaginary parts of y as against the real and imaginary parts of lambda and determine where the two respective zero contour lines cross.
You have said that Q and W are complex-valued square matrices, and M would necessarily be square for you to speak of inv(M). Suppose you know three additional facts:
1. that M and Q are Hermitian (that is, M' = M and Q' = Q);
2. that lambda is assumed to be real;
3. and that z is a column vector (real or complex).
Then it immediately follows that inv(M), W, and inv(W) are also Hermitian. Also with z a column vector, then y must be a scalar. We can therefore write:
y' = (-z'*inv(M)*inv(W)*Q*inv(W)*inv(M)*z)'
= -z'*inv(M)'*inv(W)'*Q'*inv(W)'*inv(M)'*z''
= -z'*inv(M)*inv(W)*Q*inv(W)*inv(M)*z
= y
which demonstrates that the scalar y must then be real-valued. (Note that I am using the prime symbol here, as in M', to denote matlab's conjugate transpose operator.)
Hence, given the above three conditions, you could conclude that y is always real. With complex values in Q (and possibly M) you may obtain very tiny imaginary parts for y due to round off error in actual computation, but you can then legitimately use only its real part by writing y = real(y). The question is, are these three above conditions really true for your problem? If so, that would permit you to make a simple plot of lambda versus y to determine approximately the real lambda value or values where y crosses over zero.
With respect to form (b) I think the same comments as above apply. If M and Q are Hermitian, then (using matlab's 'eig' function,) the eigenvalues of T will be real and so the indicated sum yields a real value for y. (Note: I assume you meant
T = (M)^(1/2)*Q*(M)^(1/2)
rather than M to the 1/3 power.) The 'eig' function also provides the eigenvectors of T which would enable you to find the 'x' values in this sum. I don't see what your difficulty is where you state "I can't represent the form in (b) in matlab." Why not?
Roger Stafford