필터 지우기
필터 지우기

Dlmwrite function problem to be fixed

조회 수: 1 (최근 30일)
Cladio Andrea
Cladio Andrea 2015년 2월 26일
댓글: dpb 2015년 2월 26일
Hello guys i have a matrix of C(6,5) , what i want is to just take first and the fifth column and insert it into a text file , and i want it to be something like:
0 0
1 1
3 8
4 7
8 1
do you know which steps i have to follow? Thank you!

채택된 답변

dpb
dpb 2015년 2월 26일
doc colon
dlmwrite('newfile',[C(:,1) C(:,5)]);
  댓글 수: 2
Cladio Andrea
Cladio Andrea 2015년 2월 26일
Thank you so much for the answer! Just one problem i have, the matrix size is 3600000 and in the text file i need the size also but in text file it seems in exponential notation, and i want to get rid of this stupid exp notation, do you know how to?
dpb
dpb 2015년 2월 26일
doc dlmwrite
Look at the optional 'precision' output that lets you specify either significant digits wanted or a specific format string.
NB: however, if the file is this large, what are you doing writing it as text file anyway? Can't possible expect to look at it by hand so why not use a stream file or if keeping it in Matlab, .mat?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by