This code that I have tried always shows an error, I have seen that it works on youtube but not for me. It say "Error using sym>convertChar (line 1546)"

조회 수: 1 (최근 30일)
syms x t s X F
F=laplace('diff(x(t),t,t)+7*diff(x(t),t)+10*x(t)=20',s);
F=subs(F,{'laplace(x(t),t,s)'},{X});
F=subs(F,{'x(0)','D(x)(0)'},{5,3});
X=solve(F,'X');
x=ilaplace(X);
pretty(x);
ezplot(x,[0 10]);

답변 (1개)

Ananya Tewari
Ananya Tewari 2021년 8월 4일
Hi,
The laplace function requires symbolic expression as an input. You can use str2sym() to convert string into symbolic equations.
Refer to this question asked by another user.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by