Friends, I have a variable with four columns. Although I can export it in a single csv file, what I have to do, if I want to export the four columns in two csv files, each containing two columns. Attached is a sample variable.

 채택된 답변

dpb
dpb 2017년 5월 4일

0 개 추천

csvwrite('file1.csv',x(:,1:2))
csvwrite('file2.csv',x(:,3:4))
File names and subscript expressions can all be variables under programmatic control, of course. All you have to do is know what it is you need/want where...

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

태그

질문:

2017년 5월 4일

답변:

dpb
2017년 5월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by