% nv_to_dim2.m
%   Naummann境界条件の問題の差分解を2次元配列に変換
%   written by Masashi Katsurada
%   modified by Masashi Katsurada on 2012/9/29
%
% example:
%   [v,d]=eigs(plate_f1(N,0.3),200,0);
%   u=nv_to_dim2(v(:,201-n),N,N);
%   x=0:1/N:1; y=0:1/N:1;
%   u=u';
%   mesh(x,y,u);
%   contour(x,y,u);

function u=nv_to_dim2(v,nx,ny)
  u=zeros(nx+1,ny+1);
  u(:)=v;
  u(1,:)=u(1,:)*sqrt(2);
  u(nx+1,:)=u(nx+1,:)*sqrt(2);
  u(:,1)=u(:,1)*sqrt(2);
  u(:,ny+1)=u(:,ny+1)*sqrt(2);
  