making rectangular matrix by non rectangular matrix by putting zeros
이전 댓글 표시
Hello, I have a text file data which every row has different numbers which the longest is 17 numbers. If the number of rows be n, how may I make a matrix n*17 which put zero at the end of those rows which have fewer numbers than 17? As an example this data which should be 10*17 matrix.
1 1
2
3 2 2 4 2 2 2 3 3
5
1
6
1 1
6
6 7 7 7 6 6 8 8 8 8 6 7 7 7 6 6 8
6 9 4 4 4 10 3 10 5 10 4 4 4
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!