Error with latex function

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개)

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

질문:

2018년 6월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by