Error of sym>convertChar

1 次查看(过去 30 天)
How can I solve this problem? Thanks a lot.

采纳的回答

Stephan
Stephan 2021-4-20
编辑:Stephan 2021-4-20
syms a b c x
f = str2sym('a*x^2 + b*x + c')
f = 
subs(f,x,5)
ans = 
subs(f,[x a b c],[5 1 2 3])
ans = 
38
  2 个评论
Steven Lord
Steven Lord 2021-4-20
Alternately since all the symbolic variables have been defined on the first line:
syms a b c x
f = a*x^2+b*x+c
f = 
subs(f, x, 5)
ans = 

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by