Displays the MNA equation on the active HTML page. :param instrObj: Results of instruction with data type matrix. :type instrObj: SLiCAPinstruction.instruction :param label: ID of the label assigned to this equation; defaults to ''. :type label: str :param labelTe
(results, label='', labelText='')
| 585 | return html |
| 586 | |
| 587 | def matrices2html(results, label='', labelText=''): |
| 588 | """ |
| 589 | Displays the MNA equation on the active HTML page. |
| 590 | |
| 591 | :param instrObj: Results of instruction with data type matrix. |
| 592 | :type instrObj: SLiCAPinstruction.instruction |
| 593 | |
| 594 | :param label: ID of the label assigned to this equation; defaults to ''. |
| 595 | :type label: str |
| 596 | |
| 597 | :param labelText: Label text displayed by **links2html()**; defaults to '' |
| 598 | :type labelText: str |
| 599 | |
| 600 | :return: HTML string that will be placed on the page. |
| 601 | :rtype: str |
| 602 | """ |
| 603 | if results.errors != 0: |
| 604 | print("Errors found during execution.") |
| 605 | return '' |
| 606 | html = '' |
| 607 | try: |
| 608 | (Iv, M, Dv) = (results.Iv, results.M, results.Dv) |
| 609 | Iv = sp.latex(roundN(Iv)) |
| 610 | M = sp.latex(roundN(M)) |
| 611 | Dv = sp.latex(roundN(Dv)) |
| 612 | label = _addLabel(label, caption=labelText, labelType='eqn') |
| 613 | html = '<h3>' + label + 'Matrix equation:</h3>\n' |
| 614 | html += '\\begin{equation}\n' + Iv + '=' + M + '\\cdot' + Dv + '\n' |
| 615 | html += '\\end{equation}\n' |
| 616 | html = _insertHTML(ini.html_path + ini.html_page, html) |
| 617 | except: |
| 618 | print("Error: unexpected input for 'matrices2html()'.") |
| 619 | return html |
| 620 | |
| 621 | def pz2html(instObj, label = '', labelText = ''): |
| 622 | """ |
nothing calls this directly
no test coverage detected