I have been working with some data from a recent experiment and would like to move the data into a .dat file. However I have multiple vectors and require them in the same file.
Say I have the vectors:
x = [1, 2, ...];
y = [3, 4, ...];
How would I go about doing this?

 채택된 답변

dpb
dpb 2020년 2월 23일

1 개 추천

Simplest, presuming they're the same length would be to write as 2D array. I'd write as column instead of row..
writematrix([x.' y.'],'yourNewDataFile.dat');
will write a csv file with default precision.
See documentation for more options.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

질문:

2020년 2월 23일

답변:

dpb
2020년 2월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by