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: expandMAT.m
    path of file: ./repos/HoloLib-MATLAB/source
    
    the code of the file until where you have to start completion: function res = expandMAT(data, R_multiple, C_multiple, ex_style)
%矩阵扩展
%   M = expandMAT(A, RM, CM, ex_style) 对矩阵A进行行向和列向扩展
%
%   A  - R×C的矩阵
%   RM - 行向扩展倍数
%   CM - 列向扩展倍数
%   ex_style - 扩展方式  两种方式
%       'pixel' - 单个像素扩展为宏像素

    
function res = expandMAT(data, R_multiple, C_multiple, ex_style)
%矩阵扩展
%   M = expandMAT(A, RM, CM, ex_style) 对矩阵A进行行向和列向扩展
%
%   A  - R×C的矩阵
%   RM - 行向扩展倍数
%   CM - 列向扩展倍数
%   ex_style - 扩展方式  两种方式
%       'pixel' - 单个像素扩展为宏像素
%       'overll'- 整体做复制拼接扩展 实现repmat函数功能
%
%   M - 返回的扩展矩阵
%

[R, C] = size(data);
switch ex_style
    case 'pixel'
        for i = 1 : R
            tmp((i-1)*R_multiple+1:i*R_multiple,:) = repmat(data(i,:),R_multiple,1);
        end