![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/727659/image.png)
Total Solution Differential Equation
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello!
I am trying to use the code I used. Can I ask for a second opinion regarding the codes that I used if its correct or wrong. This is to solve Total Solution Differential Equation using Matlab.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/727559/image.png)
Matlab codes:
>> syms s t
>> dsolve('D2y=-12*Dy-32*y+32','y(0)=0','Dy(0)=0','t')
0 Commenti
Risposte (1)
Wan Ji
il 2 Set 2021
Modificato: Wan Ji
il 2 Set 2021
If u(t) = 1, then your solution is right.
If it is a function with respect to time, then your solution is wrong.
Exact code:
syms y(t) u(t) t
dy = diff(y,t,1);
d2y = diff(y,t,2);
eq = d2y + 12*dy + 32*y - 32*u;
conds = [y(0)==0; dy(0) ==0];
dsolve(eq, conds)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/727659/image.png)
0 Commenti
Vedere anche
Categorie
Scopri di più su Function Creation in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!