converting specific characters to a variable

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.

类别

在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息

提问:

2016-5-20

Community Treasure Hunt

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

Start Hunting!

Translated by