Symbolic Toolbox Integration Error

10 Ansichten (letzte 30 Tage)
Dan Lamone
Dan Lamone am 22 Sep. 2019
Kommentiert: Dan Lamone am 22 Sep. 2019
Trialing the symbolic toolbox and attempting to run the 'Indefinite Integral of Univariate Expression' example from the int function documentation. Copy and pasting the exact code and recieve the following:
syms x
expr = -2*x/(1+x^2)^2;
F = int(expr)
--------
Error using sym/subsindex (line 855)
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables, and function body must be sym expression.
-----------
Is this a settings error? Demo/trial error? The symbolic differentiation tool works just fine. Many thanks for your help!

Akzeptierte Antwort

madhan ravi
madhan ravi am 22 Sep. 2019
You probably have a variable named int, clear that workspace using:
clear int
%or
clear all
  1 Kommentar
Dan Lamone
Dan Lamone am 22 Sep. 2019
Thank you. Clear all did the trick. Cheers.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by