Creating field as vector/array

3 ビュー (過去 30 日間)
engirl
engirl 2015 年 2 月 8 日
回答済み: Star Strider 2015 年 2 月 8 日
I want to create initial field. It takes the following inputs: ● width, the width of the field where (10 ≤ width ≤ 20) ● height, the height of the field where (20 ≤ height ≤ 40) ● numCreatures, the number of creatures, not including the fox, who are playing the game where (1 ≤ numMinions ≤ 5) ● startSide, the side of the field where the creatures start the game set either to the integer 1 for the North side or 0 for South side

回答 (1 件)

Star Strider
Star Strider 2015 年 2 月 8 日
I’m not certain exactly what you want to do, but starting by reading the documentation on Functions seems to me to be appropriate.
You likely want to create a function file for your simulation, that takes those data as input arguments.

カテゴリ

Help Center および File ExchangeJust for fun についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by