Convert RLGC transmission line parameters to Sparameters
s_params = rlgc2s(R,L,G,C,length,freq,z0)
s_params = rlgc2s(R,L,G,C,length,freq)
s_params = rlgc2s(R,L,G,C,length,freq,z0)
transforms RLGC
transmission line parameter data into Sparameters.
s_params = rlgc2s(R,L,G,C,length,freq)
transforms RLGC transmission
line parameter data into Sparameters with a reference impedance of 50 Ω.

The output is a 2Nby2NbyM array of Sparameters. The following figure describes the port ordering convention of the output. This port ordering convention assumes that:
To reorder ports after using this function, use the 
Bhatti, A. Aziz. “A computer Based Method for Computing the NDimensional Generalized ABCD Parameter Matrices of NDimensional Systems with Distributed Parameters.” Southeastern Symposium on System Theory. SSST, 22nd Conference, 11–13 March 1990, pp. 590–593.