Evaluating multivariable functions in Matlab

I'm wondering if MATLAB can evaluate multivariable functions. Specifically, I have a function that has 5 variables with each variable taking 5 values each. Can MATLAB generate all the possible values (combination of 5 variables with 5 possible values each results to 625 values) of the function?
I am a beginner and would like to immediately know if MATLAB can perform my needed simulation. Any links to a reference material online is highly appreciated.
​​​​​​​Thanks.

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 3 月 4 日
編集済み: Walter Roberson 2019 年 3 月 4 日

0 投票

See https://www.mathworks.com/matlabcentral/answers/446743-how-to-change-many-loops-to-recursive-function#answer_362505 where I show using ndgrid to process all discrete values of 4 variables simultaneously; it can easily be extended to 5 variables.

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

製品

リリース

R2018a

質問済み:

2019 年 3 月 4 日

編集済み:

2019 年 3 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by