% Testing iterative solution
%
% Samuli Siltanen February 2014

% Define the matrix and right hand side
B = [[0 1];[1 0]]
y = [3;-1]

% Solve using inverse matrix
inv(B)*y

% Solve using GMRES
gmres(@iterfun,y)
