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에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!