%  Demonstration of spatial impulse response for a
%  rectangular aperture using Field II
%
%  Version 2, September 7, 2009, Joergen Arendt Jensen

clf

%  Place coordinate system for spatial impulse response

sir=axes('position',[0.07 0.6 0.5 0.35]);
set(sir,'NextPlot','replace');

%  Place coordinate system for position selection

position=axes('position',[0.07 0.15 0.5 0.35]);
set(position,'NextPlot','replace');

%  Place coordinate system for explanation

explanation=axes('position',[0.65 0.25 0.3 0.6]);
set(explanation,'NextPlot','replace');

%  Place push buttons on the display

t1=uicontrol('Style','Pushbutton',...
             'Units','normalized','Position',[0.02 0.02 0.15 0.05],...
             'Callback','find_pos;',...
             'String','Position');

t2=uicontrol('Style','Pushbutton',...
             'Units','normalized','Position',[0.42 0.02 0.15 0.05],...
             'Callback','find_circle',...
             'String','Find circle');

t3=uicontrol('Style','Pushbutton',...
             'Units','normalized','Position',[0.82 0.02 0.15 0.05],...
             'Callback','find_time',...
             'String','Find time');

%  Initialize the field system

setup

%  Make the first calculation

find_pos

