Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
I have a cell array of 37x1 cells. each cell is having around 133x7 table. each cell data is one day data. therefore 37 days means 37 days data. i want to export each day (133x7 table) to a new txt file.
조회 수: 1 (최근 30일)
이전 댓글 표시
i am attaching a snapshot of how da
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191028/image.jpeg)
ta looks like. please help
댓글 수: 1
Shakir Hussain
2018년 11월 10일
편집: madhan ravi
2018년 11월 10일
You can try this one
test = cell2mat(cellfun(@transpose,iwant,'uniform',0));
it will transpose you data in simple matrix
or reshape first then convert into matrix
if you have solved with any other way then kindly share here.
답변 (3개)
KSSV
2018년 6월 5일
N = 37 ;
% create random data
A = cell(N,1) ;
for i = 1:N
A{i} = rand(133,7) ;
end
% Method 1, use cellfun
iwant = cell2mat(cellfun(@mean,A,'un',0)) ;
% method 2, use a loop
iwant = zeros(N,7) ;
for i = 1:N
iwant(i,:) = mean(A{i}) ;
end
save 'myfile.txt' iwant -ascii
댓글 수: 1
Peter Perkins
2018년 6월 5일
I think you'd want to loop over the cell array, and call readtable on each cell's (table) contents.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!