These equations were taken directly from real MATLAB code. As you can see, they are much easier to understand and debug when visualized using MathViz.
Currently supports:
MATLAB and C-style variable names: my_var_1
struct variables: record.field.sub_field
R data frame variables: frame$field
flattening of fractions: x / y / z / w
exponents: a^b
square root: sqrt(x/y)
unary minus: -x
parentheses: 2*(3*4)
comparisons: x <= 3 / y
array accesses using parens and braces (MATLAB) and brackets (C-style): A(5), A{5}, A[5]
function calls: fib(n-1) + fib(n-2)
elimination of redundant parentheses: ((x + y)) ^ (((z + w)))
MATLAB array accesses using colons and commas: A(i,j,k,:)
Python array accesses and slicing: A[3:-2]
MATLAB left divide: y \ x
MATLAB dot operators: x.*y, A.^b
MATLAB transpose: A.'
MATLAB Hermitian transpose: A' (same as A.' for real matrices)
Possible new features (if there is a demand):
One-click feedback mechanism for queries that are rendered incorrectly
Multi-dimensional arrays: A[3][5]
Selective rendering of an entire source file, not just of one line of code
MathViz was created by Philip Guo. If you have
questions, bug reports, or suggestions, please contact me at
philip@pgbovine.net
Special thanks to Kevin Cockrell for creating an early
prototype, inspiring the creation of MathViz, doing beta testing, making
feature requests, and providing example MATLAB code.