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: logn.m
    path of file: ./repos/Algorithms_MathModels/《基于MATLAB的高等数学问题求解》 随书附带源程序/CH06
    
    the code of the file until where you have to start completion: function y=logn(x,a)
%LOGN   求任意底的对数

    
function y=logn(x,a)
%LOGN   求任意底的对数
% Y=LOGN(X,A)  求底数为A、真数为X的对数，将结果返回到Y中
%
% 输入参数：
%     ---X：对数的真数
%     ---A：对数的底数
% 输出参数：
%     ---Y：返回的对数值
%
% See also log, log2, log10

if ~isequal(class(x),class(a))
    error('LOGN requires input arguments be the same class.');
end