how to delete empty cells and save in the text file

조회 수: 6 (최근 30일)
Jothi
Jothi 2014년 11월 3일
댓글: Jothi 2014년 11월 3일
sir,
The cell array C contains the following text,
C= {
'one' 'two' [] 'three' --- first row
'three' [] [] 'one' 'two' 'non' --- second row
[] [] [] 'four'}; --- third row
we want the output file is save in the text file as the following format ie., row by row delete the empty cells.
C={
'one' 'two' 'three' --- first row
'three' 'one' 'two' 'non' --- second row
'four'}; --- third row
thank you

답변 (1개)

Sreeram Mohan
Sreeram Mohan 2014년 11월 3일
Look at a similar question being answered at the following thread
Hope this helps !!!
Sreeram
  댓글 수: 1
Jothi
Jothi 2014년 11월 3일
sir,
Already seen this method but, this is not a row by row deletion.
This method deletes the entire empty cells in the cell arrays.
But I want row by row deletion.
Thank you for your kind information.

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

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by