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: right_mtimes.m
    path of file: ./repos/IRtools/Extra/prblur_tools/@kronMatrix/private
    
    the code of the file until where you have to start completion: function y = right_mtimes(x, k)
%  Helper function for mtimes.m
%
%  
%  if x is a scalar, use the property that
%  kron(A, B) * x = kron(x * A, B)
%
%  if x is a vector such that x' = vec(X) 
%  use the property that
%  x * kron(A, B) = vec(B' * X * A)'
%

% Spring 2002, created by R. Wright

% 9/2002 updated by L. Perrone for incorporation into new
% kronMatrix class


disp('right')
A = k.a;
B = k.b;

    
function y = right_mtimes(x, k)
%  Helper function for mtimes.m
%
%  
%  if x is a scalar, use the property that
%  kron(A, B) * x = kron(x * A, B)
%
%  if x is a vector such that x' = vec(X) 
%  use the property that
%  x * kron(A, B) = vec(B' * X * A)'
%

% Spring 2002, created by R. Wright

% 9/2002 updated by L. Perrone for incorporation into new
% kronMatrix class


disp('right')
A = k.a;
B = k.b;
l = length(A);
xsize = size(x);
A1size = size(A{1});
B1size = size(B{1});

if length(x) == 1
   for i=1:l
      A{i} = A{i}*x;
   end