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: gyr_calibration.m
    path of file: ./repos/nav_matlab/lib/calbiration
    
    the code of the file until where you have to start completion: %% GYR Calibraiton
% example:
% input = [
%     65.2191    0.1712    0.4618
%    -0.0901   71.9079   -0.0728
%    -0.5425   -0.1436   71.7273
%   -65.0873   -0.1008   -0.4814
%     0.1573  -7
    
function [C, B] = gyr_calibration(input, ref)

%%  ST mehold AN4508 Application note Parameters and calibration of a low-g 3-axis accelerometer
A= [input -[ones(length(input), 1)]];
B = ref;

X = inv(A'*A) * A'*B;
C = X(1:3,:)';
B = X(4,:)';


%% Time- and Computation-Efficient Calibration of MEMS 3D Accelerometers and Gyroscopes 
% TBD

end