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: fdtd_free.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;N_h =200; % number of z-cellsN_t =100; % number of time stepstime =0.0;E_x = zeros(N_h,1); % Initialize fields to zero at all pointsH_y = zeros(N_h,1);t_zero =40.0; % center of incident pulsewidth =12; % width of the incident pulsetic; % start timerfor istep =1:N_t % time loop time = time +1; pulse = exp(-0.5*((t_zero - time)/width)^2); % Gaussian pulse for i =2:N_h E_x(120)= pulse; % location of initial pulse E_x(i)= E_x(i)-0.5*(H_y(i)- H_y(i-1)); end % for i =1:(N_h -1) H_y(i)= H_y(i)-0.5*(E_x(i+1)- E_x(i)); endendtoc % measure elapsed time since last call to ticsubplot(2,1,1); plot(E_x)ylabel('E_x'); xlabel('FDTD cells')axis([0200-11])subplot(2,1,2); plot(H_y)ylabel('H_y'); xlabel('FDTD cells')axis([0200-11])pause
close allElaborate the code of 1d fdtd that we write at lecture.Your explanation must have the followings;
 % File name: fdtd_free.m% Plots E and H components of Gaussian

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!