How to evaluate a matrix of commands

4 ビュー (過去 30 日間)
Ali Almakhmari
Ali Almakhmari 2023 年 9 月 15 日
コメント済み: Dyuman Joshi 2023 年 9 月 15 日
Hello guys. I have an array of commands that has 350 commands (a 350 by 1 array) in string format. Each command in the array when run, will produce a single number. I want an easy way to evaluate this array of commands and get my corresponding array of numbers without using a loop. I hope someone can help.

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 9 月 15 日
"Each command in the array when run, will produce a single number."
Or for quite large values, use str2sym, if you have the Symbolic Math Toolbox.
  3 件のコメント
Ali Almakhmari
Ali Almakhmari 2023 年 9 月 15 日
str2sym worked like a charm. And regarding your second question, I received this data from a colleague who gave it to me like that hhhhh, it was quite an inconveniance. Thanks for the help.
Dyuman Joshi
Dyuman Joshi 2023 年 9 月 15 日
I agree, It is not a conveniant nor an efficient form of data to work with.
You are welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by