making rectangular matrix by non rectangular matrix by putting zeros
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Linear Algebra en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!