⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 create_rectangles.m

📁 The Finite Difference Time Domain Method for Electromagnetics With MATLAB Simulations Atef Elshe
💻 M
字号:
disp('creating rectangles');

for ind = 1:number_of_rectangles
    % convert rectangle end coordinates to node indices 
    blx = round((rectangles(ind).min_x - fdtd_domain.min_x)/dx) + 1; 
    bly = round((rectangles(ind).min_y - fdtd_domain.min_y)/dy) + 1; 

    bux = round((rectangles(ind).max_x - fdtd_domain.min_x)/dx)+1; 
    buy = round((rectangles(ind).max_y - fdtd_domain.min_y)/dy)+1; 

    % assign material type of the rectangle to the cells
    material_2d_space (blx:bux-1, bly:buy-1) ...
        = rectangles(ind).material_type;
end

⌨️ 快捷键说明

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