-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRun_EM.m
26 lines (20 loc) · 928 Bytes
/
Run_EM.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function [ ] = Run_EM( fileName )
%RUN_EM Runs a function to solve all relavent EM parameters befor solving
%diffusion equation numerically
% loads appropriate initialization file
load(strcat(fileName,'_init.mat'));
% thickness of each layer - thick(layer)
syms t z;
%Determine crossAR
intedAR(1,1) =t-t;
% for each Fluence
for(indexFluence = 1:length(Fluence))
disp(['Started to cal ',num2str(Fluence(indexFluence)),' J/m^2'])
for(indexGeo = 1:numGeo)
% Solved for amplitudes (AR) of EM waves propagating through stack.
[AR(indexFluence,indexGeo,1:NumLayer(indexGeo)),tempE,winL] = genAR(Eps(indexGeo,1:NumLayer(indexGeo)), NumLayer(indexGeo), Thick(indexGeo,1:NumLayer(indexGeo)), Mew(indexGeo,1:NumLayer(indexGeo)),Fluence(indexFluence),0);
E(indexFluence,indexGeo,1:NumLayer(indexGeo)) = tempE(1,1:end);
end
end
save(strcat(fileName,'_init_wEM.mat'));
end