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: transform.m
    path of file: ./repos/mexopencv/+cv
    
    the code of the file until where you have to start completion: %TRANSFORM  Performs the matrix transformation of every array element
%
%     dst = cv.transform(src, mtx)
%
% ## Input
% * __sr
    
function cv.transform performs the matrix transformation of every
% element of the array `src` and stores the results in `dst`:
%
% * when columns of `mtx` equal channels of `src`:
%
%       dst(I) = mtx * src(I)
%
% * when columns of `mtx` equal channels+1 of `src`:
%
%       dst(I) = mtx * [src(I); 1]
%
% Every element of the N-channel array `src` is interpreted as N-element
% vector that is transformed using the MxN or Mx(N+1) matrix `mtx` to
% M-element vector - the corresponding element of the destination array
% `dst`.
%
% The function may be used for geometrical transformation of N-dimensional
% points, arbitrary linear color space transformation (such as various
% kinds of RGB to YUV transforms), shuffling the image channels, and so
% forth.
%
% ## Example
% This function is equivalent to the following MATLAB code:
%
%     function dst = my_transform(src, mtx)
%         % check sizes
%         [I,J,N] = size(src);
%         [MM,NN] = size(mtx);
%         assert(N==1 || N==2 || N==3 || N==4, '1 to 4 channels');
%         assert(N==NN || (N+1)==NN, 'Wrong dimensions');
%         if N ~= NN, src(:,:,end