i am trying to solve ODE with the help of laplace transform, but it shows error in doing so, why?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Nilesh Vishwakarma
am 22 Jul. 2021
Beantwortet: Swetha Polemoni
am 28 Jul. 2021
syms x t s X
>> Dx = diff(x,t);
D2x = diff(Dx,t);
>> F=laplace(D2x+7*Dx+10*x(t)==20);
Error using sym/subsindex (line 864)
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be symbolic variables,
and function body must be sym expression.
Error in sym/subsref (line 909)
R_tilde = builtin('subsref',L_tilde,Idx);
>>
0 Kommentare
Akzeptierte Antwort
Swetha Polemoni
am 28 Jul. 2021
Hi
The error is due to usage of x(t) before decalaring it . Try the following line of code.
syms x(t)
Hope this helps
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!