Can someone help me graph these two outputs from a for loop??
16 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!