Create Unit-Spaced Matrix
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi,
is there a better way to create a simple array of acsending numbers than:
foo = reshape(1:9,3,3)
Thanks
댓글 수: 0
채택된 답변
Walter Roberson
2022년 9월 17일
No, that is the best available -- unless you want to count
foo = reshape(1:9,3,[]) %3 rows, as many colums as needed.
If you have the Computer Communications Toolbox, you can use
foo = buffer(1:9, 3) %3 rows
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!