フィルターのクリア

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 日間)
Neha gupta
Neha gupta 2018 年 6 月 5 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
i am attaching a snapshot of how da
ta looks like. please help
  1 件のコメント
Shakir Hussain
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
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 件のコメント
Neha gupta
Neha gupta 2018 年 6 月 5 日
i don't want mean. I simply want each cell table to be exported as new text file.

Peter Perkins
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.

Neha gupta
Neha gupta 2018 年 11 月 10 日
Thankyou everyone!

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by