필터 지우기
필터 지우기

How to create a symbolic expression with a string like '5.01e-7*x2 - 5.01e-7 + (-9*x1 + 4)/x1'?

조회 수: 2 (최근 30일)
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!

채택된 답변

John D'Errico
John D'Errico 2018년 6월 29일
str2sym( '5.01e-7*x2 - 5.01e-7 + (-9*x1 + 4)/x1')
ans =
0.000000501*x2 - (9*x1 - 4)/x1 - 0.000000501

추가 답변 (0개)

카테고리

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