How do I use csvwrite in order to give me the data in a column and NOT in a single comma-separated line?

3 views (last 30 days)
I want to create a txt file in which the numeric data will be in a column and not in a single comma-seperated row. I use csvwrite(out_file, Fz_norm); and it returnes all the numeric data in a single row

Accepted Answer

Thorsten
Thorsten on 15 Oct 2015
Edited: Thorsten on 15 Oct 2015
If the data is a column vector, it is printed as such
csvwrite('test.txt', (1:5)')
>> type test.txt
1
2
3
4
5
  1 Comment
katerina biot
katerina biot on 15 Oct 2015
Edited: katerina biot on 15 Oct 2015
the original data was a column vector. after I divided that with a number I want the algorithm to return a txt file in which the sata will have the original form which was like you described. But instead when I use csvwrite it returns me a text with the data in this form: 2,3,4,5

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!