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
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Type Identification dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!