Tried solving the following complex equation for W varying values of k from 0.1 to 100 and plot the positive imaginary part of the solution (W) against k. Got wrong roots using roots command : S.*((W.^2)-(C1+C2).*W.*k+C1.*C2.*(k.^2))+i.*(W-C0.*k)=0
Show older comments
C1=2 C2=1 C0=2.5 S=2.18e-7 for k=0.1:1:100 C(1)=S; C(2)=(-S.*(C1+C2).*k+i); C(3)=(S.*C1.*C2.*k3-i.*C0.*k); r=roots(C) imagr=imag(r) maxr=max(imagr) plot(k,maxr) end
Accepted Answer
More Answers (0)
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!