How to evaluate a matrix of commands

조회 수: 3 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by