function inertiaVec = inMat2Vec(I)
    % Validates and converts a 3x3 symmetric inertia matrix
    arguments
        I (3,3) double {mustBeNumeric, mustBeReal}
    end
    
    % Check symmetry (optional but good for safety)
    if ~isequal(I, I.')
        error('Inertia matrix must be symmetric.');
    end

    inertiaVec = [I(1,1), I(2,2), I(3,3), I(2,3), I(1,3), I(1,2)];
end