How to create a matrix with arbitrary dimensions
古いコメントを表示
Hi,
I like to create a matrix with arbitrary dimensions.
E.g., I need a function getMatrix(m, s), which returns a m-dimensional matrix with size s, filled with zeros or ones.
Could not working out until today, help is appreciated.
採用された回答
その他の回答 (1 件)
Geoff Hayes
2019 年 2 月 20 日
0 投票
Michael - this seems like a homework question so see zeros or ones for how to create a matrix of zeros or ones respectively. And see Declare function name, inputs, and outputs for how to build your function.
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!