Hi,
To fix the error, ensure that the length of face is a multiple of 7 before using it in the reshape function. Use integer division to avoid non-integer size arguments:
% Check if the length of 'face' is a multiple of 7
if mod(length(face), 7) ~= 0
error('The length of face is not a multiple of 7. Please check your data.');
end
% Proceed with reshaping using integer division
face_reshaped = reshape(face, [], 7) + 1;
It should resolve the issue.
