The Student Room Group
Reply 1
This is what I came up with.

The reason I have to do this is, I can't do an fzero using the function Z for some reason

xmin = 0;
xmax = 5000;
meshSize = 0.01

Result = subs(Z, {lamda}, {xmin:meshSize:xmax});
sizeOfVector = length(Result)
for i=1:sizeOfVector-1
current = Result(i);
next = Result(i+1);
if (current < 0 & next > 0)
i * meshSize
[current next]
end

if (current > 0 & next < 0)
i * meshSize
[current next]
end

if (current == 0)
i * meshSize
[current next]
end
end;
Reply 2
Ignore the question. I found what I wanted to do.

There is a thing called generalize eigen function. Which will give me the roots.

[P Q] = eig (L, M);
diag(Q)

Latest