필터 지우기
필터 지우기

How to print the element of a cell into a text file?

조회 수: 1 (최근 30일)
Mnr
Mnr 2014년 3월 28일
댓글: Mnr 2014년 3월 28일
Hello all,
I have a 1X8 cell array with all its elements are 1X300 cells and each of those 300 cells are 4X1 doubles. I would like to print the cell array into a .txt file. I would appreciate if somebody can help me please. Thanks.

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 3월 28일
If A is your cell array
M=cell2mat(cellfun(@(x) cell2mat(x),A','un',0))
dlmwrite('file.txt',M)

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by