function [A,B] = springs( N )
  ## makes a spring matrix for N particles connected by springs
  ## to each other and to walls.  Returns the inverse. 
  A = zeros(N,N);
  for i=1:N
    A(i,i) = 2 ;
  endfor
  for i=1:N-1
    A(i,i+1) = -1 ;
    A(i+1,i) = -1 ;
  endfor
  A

  B = inv(A)

  ## A and B are returned because
  ## the function declaration (top line) says so
endfunction

