1

I have the following problem: I got .mat-files from a colleague. These are produced by a python function. In these .mat-files structs are saved. Those struct-files have an invalid field name, because there is a blank-space within them. How can I use the struct-files? Is there a way to rename the files while loading them? Any Ideas? Greetings Bant

Bant
  • 53
  • 1
  • 7
  • 2
    there may be a workaround here, but by definition variables can not have spaces on them, so why do you want to read the variables "wrong" instead of asking your friend to make them right? My point is: Why try to solve a problem that is caused by incorrect use of the format. Just use correctly the format. – Ander Biguri Jan 27 '15 at 10:40
  • Which type of matfile? (see: http://stackoverflow.com/questions/4950630/ ) Also, what is the output of `matfile` on one of these files, or does it error? The obvious solution is to get your colleague to fix his code, as already said, and give you a file which is of correct format. – nkjt Jan 27 '15 at 13:12
  • @ Ander Biguri: That is a good question! I already ask him to change that several times... @ nkjt: I don't really know how to check which version it is, but when I open the Mat-File with notepad++ it says in the first line Matlab 5.0. But as exactly this version is not mentioned with in the article you linked I am not sure if that is right. – Bant Feb 04 '15 at 12:16

0 Answers0