How do I find an efficient way to create a matrix from an array
이전 댓글 표시
A=(1:100);
B=[A;A+1;A+2;....;A+100];
I'd like to create a matrix B but would prefer a faster and more efficient method than writing it out a hundred times, would appreciate any help and tips in general :)
답변 (1개)
Bruno Luong
2018년 10월 18일
A = 1:100;
B = (0:100)' + A
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!