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: gtmmag.m
    path of file: ./repos/pcm/matlab/lib/netlab3_3
    
    the code of the file until where you have to start completion: function mags = gtmmag(net, latent_data)
%GTMMAG	Magnification factors for a GTM
%
%	Description
%	 MAGS = GTMMAG(NET, LATENTDATA) takes a GTM structure NET, and
%	computes the magnification factors for each point the latent space
%	contained in LATENTDATA.

    
function mags = gtmmag(net, latent_data)
%GTMMAG	Magnification factors for a GTM
%
%	Description
%	 MAGS = GTMMAG(NET, LATENTDATA) takes a GTM structure NET, and
%	computes the magnification factors for each point the latent space
%	contained in LATENTDATA.
%
%	See also
%	GTM, GTMPOST, GTMLMEAN
%

%	Copyright (c) Ian T Nabney (1996-2001)

errstring = consist(net, 'gtm');
if ~isempty(errstring)
  error(errstring);
end