MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / matrixEqn

Method matrixEqn

SLiCAP/SLiCAPlatex.py:591–616  ·  view source on GitHub ↗

Creates a displayed matrix equation without evaluating it. :param Iv: Left hand side of the equation: vector with independent variables :type Iv: sympy.Matrix :param M: Right hand side of the equation: matrix :type M: sympy.Matrix :param Dv: Righth

(self, Iv, M, Dv, label="")

Source from the content-addressed store, hash-verified

589 return Snippet(TEX, self.format)
590
591 def matrixEqn(self, Iv, M, Dv, label=""):
592 """
593 Creates a displayed matrix equation without evaluating it.
594
595 :param Iv: Left hand side of the equation: vector with independent variables
596 :type Iv: sympy.Matrix
597
598 :param M: Right hand side of the equation: matrix
599 :type M: sympy.Matrix
600
601 :param Dv: Righthand side of the equation: vector with dependent variables
602 :type Dv: sympy.Matrix
603
604 :param label: Reference label for the table. Defaults to an empty string.
605 :type label: str
606
607 :return: SLiCAP Snippet object
608 :rtype: SLiCAP.SLiCAPprotos.Snippet
609 """
610 TEX = '\\begin{equation}\n'
611 TEX += sp.latex(roundN(Iv)) + '=' + sp.latex(roundN(M)) + '\\cdot '
612 TEX += sp.latex(roundN(Dv)) + '\n'
613 if label != '':
614 TEX += '\\label{'+ label + '}\n'
615 TEX += '\\end{equation}\n\n'
616 return Snippet(TEX, self.format)
617
618 def stepArray(self, stepVars, stepArray, label="", caption="",
619 color="myyellow"):

Callers

nothing calls this directly

Calls 2

roundNFunction · 0.90
SnippetClass · 0.90

Tested by

no test coverage detected