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!