function r = mtimes(str1,str2)
arguments
    str1 (:,:) string
    str2 (:,:) string
end
warning off;
[m, n] = size(str1);
[p, q] = size(str2);
assert(n == p, '矩阵维度不匹配，无法相乘。');

r = strings(m, q);  % 初始化结果矩阵

% 模拟矩阵乘法，字符串操作为逐元素拼接
for i = 1:m
    for j = 1:q
        combinedStr = "";
        for k = 1:n
            product = strcat(str1(i, k), str2(k, j));
            combinedStr = strcat(combinedStr, product);
        end
        r(i, j) = combinedStr;
    end
end

end