N = [5,5,5]; M = [5,5,6]; Nb= [5,5,6]; Mb= [1,2,1];
K = [6,6,6];

for i=1:3
    n  = N(i);  m  = M(i);
    nb = Nb(i); mb = Mb(i);
    k=K(i);
    
    A = randn(n,m);
    b = randn(nb,mb);
  
    x =MySolve(A,k,b);

    A^k*x-b
    
end

%% 
A = randn(5,5);
b = randn(6,1);
k = 5;
x = MySolve(A,k,b);

%%
A = randn(5,5);
b = randn(5,1);
k = 5.5;
x = MySolve(A,k,b);
