FTDT -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%FTDT Method%%%%%%%%%%%%%%%%%%%%%%%%%%%% % n = 50; n delta_x = 1; d delta_t = delta_x/(2*3e10); d Kmax = 100; K cb = 1; c k = 1:delta_x:Kmax; t = 1:n; t Ex = zeros(length(t), length(k)); Hy = zeros(length(t), length(k)); H Ex(1, :) = exp(-1*(k - Kmax/2).^2 /200); E for i = 2:length(t)-1 for k = 2:length(k)-3 Ex(i, k) = Ex(i-1, k) - 0.5*cb*(Hy(i-1, k) - Hy(i, k-1)); end Ex(i, 1) = Ex(i, 2); for k = 2:length(k)-2 Hy(i, k) = Hy(i-1, k-1) - 0.5*(Ex(i, k) - Ex(i, k-1)); end end e ################################################################################### ###################################################################################
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ################################################################################### ################################################################################### ################################################################################### ##############################################KM&&,K^#S8BIM#! #####U##########A#d#o#b#e# #P#h#o#t#o#s#h#o#p#####A#d#o#b#e# #P#h#o#t#o#s#h#o#p# #C#S#2#####8BIM################:h...
View Full Document

This note was uploaded on 08/10/2010 for the course ECE 4370 at Cornell University (Engineering School).

Ask a homework question - tutors are online