Think I've found what I need. This code loops through each matrix in the list and checks if it's already in the unique_mats array using the isequal() function. If it's not already in the array, the current matrix is added to the unique_mats array. At the end of the loop, the code displays the unique matrices. PS: Chat GPT wrote this code for me !!!
% Example list of matrices
mat_list = { [0 1 1;1 1 1], [1 1 1;0 0 1], [0 1 1;1 1 1], [1 0;1 1] };
% Initialize empty array to store unique matrices
unique_mats = {};
% Loop through each matrix in the list
for i = 1:numel(mat_list)
mat = mat_list{i};
% Check if the current matrix is unique
is_unique = true;
for j = 1:numel(unique_mats)
if isequal(mat, unique_mats{j})
is_unique = false;
break;
end
end
% Add the current matrix to the unique_mats array if it's unique
if is_unique
unique_mats{end+1} = mat;
end
end
% Display the unique matrices
unique_mats{:}