I ended up using "eval" function to solve this issue, but I know "eval" is not recommended.
How to convert string to optimization variable?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm doing constrained optimization problems using the "problem based optimization workflow". I'm using a set of equations which have been constructed through string concatenation as the optimizaton variables. I now need to convert these strings to optimvars. It's simple to convert these strings to symbolic variables (just use str2sym), but I can't find anything anologous for optimvars. Any ideas on how to do this?
Antworten (0)
Siehe auch
Kategorien
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!