% Demonstrate gmres method
%
% Samuli Siltanen November 2012

% System matrix
A = [[0 1];[1 0]];

% Right hand side
b = [1;2];

% Solve using inv
x = inv(A)*b

% solve using gmres
x = gmres('Aaction',b)
