how to convert text into expression

I have a text file which has string say as (50%((15000-a)+b)). is there any way to calculate this expression.

1 个评论

Note that (50%((15000-a)+b) is not valid MATLAB syntax, and appears to be written in some other language: you would have to write a parser for whatever language that is. This is not a trivial task.

请先登录,再进行评论。

回答(1 个)

类别

帮助中心File 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