Error with latex function
8 views (last 30 days)
Show older comments
Hello everyone,
I'm trying to corroborate some manual calculation regarding inverse laplace transforms of matrices. For this, I'm using the symbolic toolbox.
When executing "ilaplace(inv(s*I-A))", I get a valid result, a symbolic matrix, but it's totally unreadable, at least in a quick way, as it is full of parenthesis and /. I found the function "latex", which receives a symbolic argument and returns the latex expression, wich is very useful for this case as doing "latex(ilaplace(inv(s*I-A)))" would return the matrix in latex code, which I can quickly compile and read in a normal manner. The problem is, I'm getting the following error:
"Error using sym/subsindex (line 814) Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function body must be sym expression."
I tried with "latex(s+1)" and it gives me the same error, what leads me to believe it's not a problem with the matrix im getting. Can anyone help me? It's very late and I'm tired, so it sure is a dumb mistake, but any help is apreciated.
Thanks!
0 Comments
Answers (0)
See Also
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!