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: HELP_patchTorus.m
    path of file: ./repos/GIBBON/docs
    
    the code of the file until where you have to start completion: %% patchTorus
% Below is a demonstration of the features of the |patchTorus| function

%%
clear; close all; clc;

%% Syntax
% |[F,V]=patchTorus(r,nr,rc,nc,patchType);|

%% Description
% This function generates patch for a torus with desired dimensions a
    
function

%%
clear; close all; clc;

%% Syntax
% |[F,V]=patchTorus(r,nr,rc,nc,patchType);|

%% Description
% This function generates patch for a torus with desired dimensions and
% mesh type

%% Examples

%% 
% Plot settings
fontSize=10;
faceColor='b';
faceAlpha=1;
edgeColor='k';
edgeWidth=2;
markerSize=25;

%% Building a mesh of a torus

%Torus parameters
r=1; %Sphere radius
rc=2.5; %Central radius
nr=16;
nc=25;
patchTypes={'quad','tri_q','tri','honey'};

% Open figure for plotting
cFigure; 

%Plot the various mesh types
pColors=gjet(4);
for q=1:1:4
    [F,V]=patchTorus(r,nr,rc,nc,patchTypes{q});
    subplot(2,2,q); hold on;
    title([patchTypes{q}],'FontSize',fontSize,'Interpreter','none');
    xlabel('X','FontSize',fontSize); ylabel('Y','FontSize',fontSize); zlabel('Z','FontSize',fontSize);
    hp=patch('Faces',F,'Vertices',V);
%     [hn]=patchNormPlot(F,V,0.3);
    set(hp,'FaceColor',pColors(q,:),'FaceAlpha',faceAlpha,'lineWidth',edgeWidth,'edgeColor',edgeColor);
    camlight headlight; 
    set(gca,'FontSize',fontSize);
    view(3); axis tight;  axis equal;  grid on;
end