How to create a symbolic expression with a string like '5.01e-7*x2 - 5.01e-7 + (-9*x1 + 4)/x1'?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
xv cheng
il 29 Giu 2018
Risposto: John D'Errico
il 29 Giu 2018
The string is '5.01e-7*x2 - 5.01e-7 + (-9*x1 + 4)/x1'
I want to create syms x1,x2 and symbolic expression: 5.01e-7*x2 - 5.01e-7 + (-9*x1 + 4)/x1
Many thanks!
0 Commenti
Risposta accettata
John D'Errico
il 29 Giu 2018
str2sym( '5.01e-7*x2 - 5.01e-7 + (-9*x1 + 4)/x1')
ans =
0.000000501*x2 - (9*x1 - 4)/x1 - 0.000000501
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!