i=dsolve('​Dy=-8*y+40​*sin(8*t)'​,'y(0)=5') Warning: Support for character vector or string inputs will be removed in a future release. Instead, use syms to declare variables and replace inputs such as dsolve('Dy = -3*y') with syms y(t); dsolve(diff(y,

1 次查看(过去 30 天)
i=dsolve('Dy=-8*y+40*sin(8*t)','y(0)=5')
Warning: Support for character vector or string inputs will be
removed in a future release. Instead, use syms to declare
variables and replace inputs such as dsolve('Dy = -3*y') with syms
y(t); dsolve(diff(y,t) == -3*y). > In dsolve (line 126)
  2 个评论
Noah Prisament
Noah Prisament 2023-11-27
Hi Juan, this question would be better posted in MATLAB Answers. But to resolve this warning, you can use the dsolve syntax described in the warning and explained in this documentation: https://www.mathworks.com/help/symbolic/dsolve.html which uses symbolic equations instead of an equation string.
Walter Roberson
Walter Roberson 2023-12-11
syms y(t)
i = dsolve(diff(y) == -8*y + 40*sin(8*t), y(0) == 5)
This leads to the result
i =
(15*exp(-8*t))/2 - (5*2^(1/2)*cos(8*t + pi/4))/2

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Formula Manipulation and Simplification 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by