Conversing arbitrary length data files to matrix

This function uses dynamic memory allocation to converse a data file to a matrix

Vous suivez désormais cette soumission

This function converts a data file into a matrix. The data stored in the file has arbitrary length. The function uses dynamic memory to predict the matrix size.

For example: if the data stored in a file named "data.dat" is:
1 2
3
4 5 6 7 8 9
10
After using A = File2Matrix('data.dat'), Matrix A has contents:
A =

1 2 0 0 0 0
3 0 0 0 0 0
4 5 6 7 8 9
10 0 0 0 0 0

Citation pour cette source

Steven Huang (2026). Conversing arbitrary length data files to matrix (https://fr.mathworks.com/matlabcentral/fileexchange/8003-conversing-arbitrary-length-data-files-to-matrix), MATLAB Central File Exchange. Extrait(e) le .

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et MATLAB Answers

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0.0