Can someone help me graph these two outputs from a for loop??

I believe i need to put them into an array then graph it, but i really do no know. i need to recreate the graph below, just the green and red lines. I have also attatched a link to a google drive file with all the other files that you would need to run this code. these files are ec.txt, and all the files that calcmie calls while it is running. I need both C.ext and C2.ext graphed.
close all
clc
clear
b = 70e-9;
a = 49e-9;
epsilon_b=1;
epsilon_b2=1.9;
s=.5;
m = load('ec.txt');
n = 1
for n = 1:96
x=m(n,1)
y=m(n,2)
z=m(n,3)
lambda=x*1e-6
epsilon_c=y+1i*z
epsilon_s=(1-s)*epsilon_b+s*epsilon_c;
epsilon_s2=(1-s)*epsilon_b2+s*epsilon_c;
r = [a b];
ns = sqrt([epsilon_c epsilon_s]);
ns2 = sqrt([epsilon_c epsilon_s2]);
nm = sqrt(epsilon_b);
nm2 = sqrt([epsilon_b2]);
[S,C] = calcmie(r, ns, nm, lambda);
[S,C2] = calcmie(r, ns2, nm2, lambda);
C.ext
C2.ext
end
loglog(lambda,C.ext,'g')

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2020년 12월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by