필터 지우기
필터 지우기

converting specific characters to a variable

조회 수: 2 (최근 30일)
naman
naman 2016년 5월 20일
답변: Star Strider 2016년 5월 20일
Hi I have a string which look like this "x1 + x2+ 2.0e-14". I want to convert x1 and x2 to variables and use further. In addition I also want to convert the "2.0e-14" as a number. I have plenty of such variables. Is there any script which can recognize characters starting with "x" are variables and rest of them are numbers.

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 5월 20일

Star Strider
Star Strider 2016년 5월 20일
You will need the Symbolic Math Toolbox to do what you want.

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by