You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: matrix_inversion.m
    path of file: ./repos/code-backup/6th_sem/MATLAB/27th-Feb-2018
    
    the code of the file until where you have to start completion: %function [x,n]=matrix_inversion(a,b,n) : Function to solve linear
%simultaneous equations using matrix inversion method
function [x,n]=matrix_inversion(a,b,n)
%To construct initial augmented matrix
aug=a; % copying matrix a(,) to matrix aug(,)
%To add identity matix on RHS of aug(,)
for i=1:n
    
function [x,n]=matrix_inversion(a,b,n) : Function to solve linear
%simultaneous equations using matrix inversion method
function [x,n]=matrix_inversion(a,b,n)
%To construct initial augmented matrix
aug=a; % copying matrix a(,) to matrix aug(,)
%To add identity matix on RHS of aug(,)
for i=1:n
    for j=1:n
        if i==j
            aug(i,j+n)=1;
        else
            aug(i,j+n)=0;
        end