function swap2 (a,b)
if nargin ~=2
    error('swap1 requires two arguments')
end
disp({'before', a,b});
temp=b;
b=a;
a=temp;
disp({'after', a,b});
whos
disp('Returning from swap2')