How can I export a matrix as a CSV file?
5,314 views (last 30 days)
I have a 320x2 matrix with doubles. I want to save it in a CSV file in the following pattern:
234,2 671,5 735,1 264,2 346,7 ... etc.
I googled this problem and found the function "csvwrite". However, when I use that function like this
I get the following:
What is going on here? How can I solve this issue?
Thanks a lot, Toby
More Answers (4)
Jos (10584) on 26 Apr 2016
You and your computer disagree on what to use as a decimal symbol: a . or a ,
I strongly recommend you to use a decimal point. Probably that means you have to change your locale / regional settings in the operating system.
Sindar on 12 Mar 2019
It sounds like all you need to do is print a column vector instead of a row vector. This can be done easily:
The '.' is important only if you have complex data