function [ A, P, M, bd] = MGGetMatrix( mg, level )
%MGGETMATRIX Summary of this function goes here
%Detailed explanation goes here
A = mg.A{1,level};
if nargout >= 3
    M = mg.M{1,level};
end
if nargout == 4
    bd = mg.bd{1,level};
end

if level > 1
    P = mg.P{1,level-1};
else
    P = [];
end