Read text and save it in an array (MatLab)

Hi I hope somebody can give an advice,

I am working in a Matlab programm, I need to read a textfile with 3 columns separated with a "," like this:


Once I read the data I need to save it in an array (Matrix),
I am first trying to read a text file (5 colulmns) separated by a blank space and then modify it in order to recognize the " ," as the previous example.

1. I am running the attached m file but I got the same error message:
??? Subscripted assignment dimension mismatch.

Error in ==> GetData1 at 42
Any recomendation??

2. How can I modify it in order to read and save the text file but now separated by a comma "," ????

Thank you very much

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!