the question about visualizatiion of 3D FDTD using matlab ?
anybody can help me....
I had make a 3d fdtd program using matlab, but i have difficults to make program codes of it to visualize the fields distribution in 3D ( Ex, Ey, Ez) ?
hmmm....i dont know what's object that you are visualized ???
may be for 2D generally this is can u try..
after script of field array of your program, u write :
% Movie initialization
tview(:,: )=ez(:,:,kobs); <-- to see field distr. at z= kobs
subplot(1,1,1),pcolor(tview');
shading flat;
caxis([-0.1 0.1]); <---- range of field intensity in color
axis([1 IE 1 JE]); <--- range of x and y axis
colorbar;
axis image;
title(['Ez at time step',= 0']);
xlabel('i coordinate');
ylabel('j coordinate');
rect=get(gcf,'Position');
rect(1:2)=[0 0];
M=moviein(nmax/4,gcf,rect);
after script of " update field", u write :
% visualize fields
if mod(n,4)==0; <--- to see figure for 4 time delay
timestep=int2str(n);
tview(:,: )=ez(:,:,kobs);
subplot(1,1,1),pcolor(tview');
shading flat;
caxis([-0.1 0.1]);
axis([1 IE 1 JE]);
colorbar;
axis image;
title(['Ez(i,j,k= ?), time step = ',timestep]);
xlabel(' i coordinate i');
ylabel('j coordinate');
nn=n/4;
M(:,nn)=getframe(gcf,rect);
end;
end
movie(gcf,M,0,10,rect);
yea..may be U just need to try it....
but if to visualize 3D...I'm can not too.., may be the other friends can help...
ok peep..thanks.
but I'm still difficults how to simulate the field distribution ( Ex, Ey, Ez) in three dimension.
(I'm beginner)
if you meen you need to shoe the results in 3D, i should suggest you to use inherent 3D visualization of Matlab Toolboxs. i dont now remember the toolbox, but i think they are in PDE toolbox, i used it befor, it was wonderfull and so pretty. sorry that i cant remember exactly:(, try to search matlab help. if you still couldnt find it, i will help, just PM me.
thanks Mamali,
Are there anybody have a 3D FDTD matlab code with PML ?