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: line.m
    path of file: ./repos/spinw/swfiles/+swplot
    
    the code of the file until where you have to start completion: function hPatch = line(varargin)
% creates 3D line patch
% 
% ### Syntax
% 
% `hLine = swplot.line(rStart, rEnd)`
%
% `hLine = swplot.line(r,[])`
% 
% `hLine = swplot.line(rSta
    
function
%   will plot $n_{obj}$ number of disconnected curves. The $i$th
%   curve will follow the `x=r(1,i,:)`, `y=r(2,i,:)`, `z=r(3,i,:)`
%   (parameteric) segmented curve.
% 
% `lineStyle`
% : Line style, default value is `'-'` for continuous line. Any other
%   Matlab line style string is accepted: `'--'`\|`':'`\|`'-.'`\|`'none'`.
% 
% `lineWidth`
% : Line width in pt, default value is 0.5.
% 
% `mPatch`
% : If `true`, a separate patch object will be created per line
%   segment. Default is `false`, a single patch object will store all
%   line segments.
% 
% ### See Also
% 
% [matlab.line]
%


if nargin == 0
    swhelp swplot.line
    return
end