Azzera filtri
Azzera filtri

converting specific characters to a variable

2 visualizzazioni (ultimi 30 giorni)
naman
naman il 20 Mag 2016
Risposto: Star Strider il 20 Mag 2016
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.

Risposte (2)

Azzi Abdelmalek
Azzi Abdelmalek il 20 Mag 2016

Star Strider
Star Strider il 20 Mag 2016
You will need the Symbolic Math Toolbox to do what you want.

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by