Code covered by the BSD License

# Traveling Wave Antenna Design

### Florian D L Peters (view profile)

A simple tool to design Traveling Wave Slot Antennas (GUI)

CompNodes.m
```%
%                   --- function [nod] = CompNodes(param) ---
% =======================================================================
%  This function computes the node values as indicated in [2]
%  in the main function
%
%  input:  parameter matrix
%  output: node values
%
%
%    n  = { 1, for  n = 1
%        = { x1, for n = 2
%        = {(n-1)(xn-1)+(bn-2)(n-2), for n>=3
%
%    Rn = { 0, for n = N+1 (matched)
%        = { S11_absorber for n = N+1 (unmatched)
%        = { (N-1)(eN-1) , for n=N
%        = { (n-1)(en-1)+(n+1)fn+S12_n(Rn+1), for 1<n< N
%        = {              (n+1)fn+S12_n(Rn+1), for n=1
%
% =========================================(c) FDL Peters Univ.du.QC 2012

function [nod] = CompNodes(param,Pnr)
nod=[];
global MTCH;
global N;
global S11absorb;
% temp: put variable position in param here:
global s11_nr ;
global s21_nr ;
global s22_nr ;
global b_nr   ;
global e_nr  ;
global f_nr  ;
global x_nr  ;

% 1. ====  forward path n
nod(1) = 1;
nod(2)= param(1,x_nr);  % look up for x_nr
for n=3:1:N+1  % (n-1)    (xn-1)             +(bn-2)           (n-2)
nod(n)   = nod(n-1)* (param(n-1,x_nr))  +(param(n-2,b_nr)*nod(n-2));
end

% 2. =====  backward path Rn
% for n = N+1
if strcmp(MTCH,'yes')
nod(2,N+1) = 0;
else
% nod(2,N+1) = S11absorb;
end

s11v1= [ 0 .2*ex(-36-180) 0 0];
s11v1=[0 0 0 0 0 0 0 0];
% for n = N
% ========   (N-1)            (eN-1) +  n * S11
nod(2,N)=  nod(1,N-1) * param(N-1,e_nr) + nod(1,N)*s11v1(N);

for n=N-1:-1:2
% =========     (n-1)         (en-1)       +(n+1)fn                + S12_n           (Rn+1)  +  n * S11
nod(2,n)= nod(1,n-1)*param(n-1,e_nr)+ nod(1,n+1)*param(n,f_nr)+param(n,s21_nr)* nod(2,n+1)+   nod(1,n)*s11v1(n);
end

% for n = 1
n=1;
%          (n+1)   *fn               + S21 *        Rn+1        +  n * S11
nod(2,n)= nod(1,n+1)*param(n,f_nr)+param(n,s21_nr)* nod(2,n+1) + nod(1,n)*s11v1(n);
```