Returns a list of lists with row data for the creation of a LaTeX table with symbolic poles or zeros. :param roots: List with symbolic roots :type roots: List with sympy expressions :param Hz: True if frequencies must be displayed in Hz, False for rad/s. :type Hz: Bool
(roots, Hz, pz)
| 997 | return lineList |
| 998 | |
| 999 | def _symRoots2TEX(roots, Hz, pz): |
| 1000 | """ |
| 1001 | Returns a list of lists with row data for the creation of a LaTeX table |
| 1002 | with symbolic poles or zeros. |
| 1003 | |
| 1004 | :param roots: List with symbolic roots |
| 1005 | :type roots: List with sympy expressions |
| 1006 | |
| 1007 | :param Hz: True if frequencies must be displayed in Hz, False for rad/s. |
| 1008 | :type Hz: Bool |
| 1009 | |
| 1010 | :param pz: Identifier prefix: 'p' ofr poles 'z' for zeros. |
| 1011 | :type pz: str |
| 1012 | |
| 1013 | :return: List of lists with data of poles or zeros |
| 1014 | :rtype: list |
| 1015 | """ |
| 1016 | lineList = [] |
| 1017 | i = 0 |
| 1018 | for root in roots: |
| 1019 | i += 1 |
| 1020 | if Hz == True: |
| 1021 | line = [sp.Symbol(pz + '_' + str(i)), |
| 1022 | '$' + sp.latex(roundN(root/2/sp.pi)) + '$'] |
| 1023 | else: |
| 1024 | line = [sp.Symbol(pz + '_' + str(i)), '$' + sp.latex(roundN(root)) + '$'] |
| 1025 | lineList.append(line) |
| 1026 | return lineList |