Question: % File name: fdtd _ free.m % Plots E and H components of Gaussian pulse in a free space % after some number of time
File name: fdtdfree.m Plots E and H components of Gaussian pulse in a free space after some number of time steps using FDTD method No animationclear all;Nh ; number of zcellsNt ; number of time stepstime ;Ex zerosNh; Initialize fields to zero at all pointsHy zerosNh;tzero ; center of incident pulsewidth ; width of the incident pulsetic; start timerfor istep :Nt time loop time time ; pulse exptzero timewidth; Gaussian pulse for i :Nh Ex pulse; location of initial pulse Exi ExiHyi Hyi; end for i :Nh Hyi HyiExi Exi; endendtoc measure elapsed time since last call to ticsubplot; plotExylabelEx; xlabelFDTD cells'axissubplot; plotHyylabelHy; xlabelFDTD cells'axispause
close allElaborate the code of fdtd that we write at lecture.Your explanation must have the followings;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
