Read text and save it in an array (MatLab) - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Read text and save it in an array (MatLab)

juancmr1juancmr1 Posts: 1Member
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.