capture_sampled_voltages.m

来自「The Finite Difference Time Domain Method」· M 代码 · 共 17 行

M
17
字号
% Capturing sampled voltages

for ind=1:number_of_sampled_voltages
    fi   = sampled_voltages(ind).field_indices;
    Csvf = sampled_voltages(ind).Csvf;
    switch (sampled_voltages(ind).direction(1))
    case 'x'
        sampled_value = Csvf * sum(Ex(fi)); 
    case 'y'
        sampled_value = Csvf * sum(Ey(fi)); 
    case 'z'
        sampled_value = Csvf * sum(Ez(fi)); 
    end
    sampled_voltages(ind).sampled_value(time_step) = sampled_value;
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?