How to find the first 3 roots of a nonlinear single variable equation?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
The problem I am trying to solve includes 5 constants and one variable. Due to my variable "gamma" I obtain different w values as solution. However, I am getting the first root, I need to get two more. Here is the code that I wrote so far.
E=2*10^9;
A=2^2*pi*10^-6;
rho=1000;
L=0.1;
mpoint=0.1;
dummy=1;
syms w
for gamma=0:0.01:pi
beta=L*w*sqrt(rho/E);
R1=mpoint*w*sin(beta)*exp(1i*gamma)/(A*sqrt(rho*E));
R2=exp(2i*gamma)-2*co(beta)*exp(1i*gamma)+1;
f(dummy)=R1+R2;
kokler(dummy)=solve(f(dummy),w);
dummy=dummy+1;
end
plot(kokler,gamma)
My main target is to obtain dispersion plot(gamma vs. w) to indicate the band gap in between the branches.
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!