Below is the simple code which shows you how to create a matrix in matlab, and after creating how we can access each cell of matrix.

clc;
clear;
close all;

M = [1 3 1 4; 3 4 3 1; 5 8 9 0; 0 2 3 1];
%M = M.';    % Taking Transpose of Matrix 'M'

fprintf('Matrix Example\n');
for i=1:4
    for j=1:4
        fprintf('%d   ',M(i,j));
    end
    fprintf('\n');
end