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: SHn2lm.m
    path of file: ./repos/HRTF-Individualization/model/matlabcode/functions/sh/shtools
    
    the code of the file until where you have to start completion: function [l,m] = SHn2lm(n)

% [l,m] = SHn2lm(n)
%

    
function [l,m] = SHn2lm(n)

% [l,m] = SHn2lm(n)
%
% For a given integer index n in the real spherical harmonic coefficient
% array, find the corresponding degree l and order m, so that
% negative m corresponds to sin(phi) and positive m corresponds
% to cos(phi) terms

if n<=0 
    error('invalid usage: n has to be greater than zero');
end