function [varargout] = testvar (varargin)

% Loop over all input arguments
for i = 1: length (varargin)

     % the input arguments are written in a vector:
    x {i} = varargin {i}; %% I changed x to a cell

end

% Loop over the output arguments nargout is their number,
%, this variable is set automatically at each function call
% of Matlab and can be used in the program code:

for i = 1: nargout
    %Condition when we have a numerical value
    if isnumeric(x {i})
        varargout {i} = 2 * x {i}; %Save a numerical value in varagout that is x{i}
    else
         varargout {i} = x (i); %Save the corresponding input into the cell  numerical value in varagout that is x{i}
    end
end 