Extra solutions using fimplicit
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Question has three parts
1) For a slab waveguide, I have been trying to obtain Dispersion plot like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253136/image.png)
2) So, I wrote a code using fimplicit and some well-chosen parameters:
function main
fimplicit (@(x,y)f(x,y),[0 10])
end
function fun = f(x,y)
nc=1.45; %cladding
nf=1.5;
ns=1.4; %substrate
h=5; %width of waveguide
beta=sqrt(x^2*nf^2-y.^2);
gammas=sqrt(beta.^2-x^2*ns^2);
gammac=sqrt(beta.^2-x^2*nc^2);
z=sin(h*y);
%TE mode
fun=z-cos(h*y)*(gammac+gammas)./(y-gammas.*gammac./y);
%TM mode
%b=(nf^2*gammas/ns^2+nf^2*gammac/nc^2)./(kappa-gammas.*gammac./kappa*nf^4/nc^2/ns^2);
%fun = ((3*I2).^(n/2)).* (an1 + an2 + an3) - (2*(189.32)^8);
end
It produced:
![mat.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253145/mat.png)
3) Now to verify the correctness of this plot, I took an example from a book for x=
according to which (
,0.55), (
,1.2),(
,1.65),(
,2.15)should be data points in dispersion curve. In plot above, corresponding to x=
, there are 5 values with the zig-zag line being unwanted one, why is this zig-zag spoiling the diagram ?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253138/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253138/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253138/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253138/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253138/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253138/image.png)
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!