How can I load a matrix data file into Matlab?
The file contains numeric data as well as strings. One line in the file corresponds to one measurement; data on the same line is separated by commas.
How can I load a matrix data file into Matlab?
The file contains numeric data as well as strings. One line in the file corresponds to one measurement; data on the same line is separated by commas.
Notre site semble d'avoir deja une question de cette sorte.
Regarde-la, stp, peut-etre ca te donnera des idees.
--- english below ----
C'est un peu plus facile si tu donnes un example du fichier que tu veux lire. En tout cas, textread pourrait etre la fonction que tu veux utiliser.
Si ton fichier s'appelle mydata.txt et s'il contient first,4.2 second,22
tu utilises
[strings,numbers] = textread('mydata.txt','%s %f','Delimiter',',');
It helps if you give an example of what your text file looks like. Most likely, textread is what you're looking for.
If your file is called mydata.txt and contains first,4.2 second,22
you can read it with
[strings,numbers] = textread('mydata.txt','%s %f','Delimiter',',');