Error of sym>convertChar

1 visualizzazione (ultimi 30 giorni)
Kutlu Yigitturk
Kutlu Yigitturk il 20 Apr 2021
Commentato: Kutlu Yigitturk il 20 Apr 2021
How can I solve this problem? Thanks a lot.

Risposta accettata

Stephan
Stephan il 20 Apr 2021
Modificato: Stephan il 20 Apr 2021
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 Commenti
Steven Lord
Steven Lord il 20 Apr 2021
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 = 
Kutlu Yigitturk
Kutlu Yigitturk il 20 Apr 2021
Thank you very much.

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by