electricpy.latex.tflatex

electricpy.latex.tflatex(sys, sysp=None, var='s', predollar=True, postdollar=True, double=False, tolerance=1e-08)[source]

Transfer Function LaTeX String Generator.

LaTeX string generating function to create a transfer function string in LaTeX. Particularly useful for demonstrating systems in Interactive Python Notebooks.

Parameters:
sys : list

If provided in conjunction with optional parameter sysp, the parameter sys will act as the numerator set. Otherwise, can be passed as a list containing two sublists, the first being the numerator set, and the second being the denominator set.

sysp : list, optional

If provided, this input will act as the denominator of the transfer function.

var : str, optional

The variable that should be printed for each term (i.e. ‘s’ or ‘jomega’). default=’s’

predollar : bool, optional

Control argument to enable/disable the dollar sign before the string. default=True

postdollar : bool, optional

Control argument to enable/disable the dollar sign after the string. default=True

double : bool, optional

Control argument to specify whether or not LaTeX dollar signs should be double or single, default=False

tolerance : float, optional

The floating point tolerance cutoff to evaluate each term against. If the absolute value of the particular term is greater than the tolerance, the value will be printed, if not, it will not be printed. default=1e-8

Returns:

latex – LaTeX string for the transfer function.

Return type:

str