# SOURCE BEGIN #####
%% pvl_singlediode 
% Solve the single-diode model to obtain a photovoltaic IV curve
%
%% Syntax
% * |[Result] = pvl_singlediode(IL, I0, Rs, Rsh, nNsVth)|
% * |[Result] = pvl_singlediode(IL, I0, Rs, Rsh, nNsVth, NumPoints)|
%
%% Description
% pvl_singlediode solves the single diode equation [1]:
% |I = IL - I0*[exp((V+I*Rs)/(nNsVth))-1] - (V + I*Rs)/Rsh|
% for I and V when given IL, I0, Rs, Rsh, and nNsVth (nNsVth = n*Ns*Vth) which
% are described later. pvl_singlediode retur