non-rectangular text file upload
Afficher commentaires plus anciens
Hi,
I have a text file in the following form:
var1, val
var2, val
var3, val, val, val
var4, val, val
var6, val
so each line represent a variable that can be either a float or a vector of float. I would like to import this data in matlab where I would have a variable named var1 that would contain the values given in the text file, and so forth.
I have looked at various documentations but i cannot find something that work for my case: there should be a same number of column and I cannot figure out how to have that variable name in my matlab code.
Thanks for your help/suggestions! Leo
Réponse acceptée
Plus de réponses (1)
leo
le 26 Jan 2012
1 commentaire
Andrew Newell
le 26 Jan 2012
Yes. Nice use of regexp - worth a vote!
Catégories
En savoir plus sur Variables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!