Pretty Equation Viewer

Versione 1.0.0.0 (2,97 KB) da Brett
Display a pretty latex-formatted version of a Matlab expression.
1,5K download
Aggiornato 18 feb 2016

Pops up a figure with a pretty latex-formatted equation for a Matlab expression. Works for previous line in a script, previous command at command prompt, or for equations passed inline. The inspiration for this was to double check that an equation typed into Matlab matches an equation in a textbook or other reference. This helps avoid misplaced parenthesis for example. The 3 use cases are as follows:
1. In a script: Make a call to pretty_equation() on the following line.

Example:
y = exp(a^3 / b^2) * (x^2 + 2*x - sqrt(3))/(x^3 + 2*x^2 - 4* x + 12);
pretty_equation()

Note: Script execution will continue when the Equation Viewer dialog
is dismissed.

2. Inline: just provide the expression as a string argument:

Example:
pretty_equation('y = exp(a^3 / b^2)')

3. Command Line: Just call pretty_equation() at the command line to
visualize the previous command.

Example:
>> y = x^2 + x;
>> pretty_equation()

Consideration has been made for multi-line expressions and comments to
make the utility robust for most use cases. Expressions are parsed with
Matlab's Symbolic Toolbox. Not all Matlab expressions translate to valid
symbolic equations (especially non-math functions, but also arrays for
example). Error handling exists to inform when expressions aren't
parsable.

Cita come

Brett (2025). Pretty Equation Viewer (https://github.com/flutefreak7/matlab_pretty_equation), GitHub. Recuperato .

Compatibilità della release di MATLAB
Creato con R2015b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Live Scripts and Functions in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Le versioni che utilizzano il ramo predefinito di GitHub non possono essere scaricate

Versione Pubblicato Note della release
1.0.0.0

Edited title and description

Per visualizzare o segnalare problemi su questo componente aggiuntivo di GitHub, visita GitHub Repository.
Per visualizzare o segnalare problemi su questo componente aggiuntivo di GitHub, visita GitHub Repository.