How do I convert my cell array into a cell array of doubles?

2 ビュー (過去 30 日間)
lil brain
lil brain 2022 年 4 月 13 日
回答済み: Voss 2022 年 4 月 13 日
Hi,
I have a cell array of cells (see attachment) and need to covert each of the cells into numeric arrays for further processing.
How can I do that in one go?
Thanks!

採用された回答

Voss
Voss 2022 年 4 月 13 日
S = load('pre_data_1.mat')
S = struct with fields:
pre_data1: {2×1 cell}
S.pre_data1
ans = 2×1 cell array
{13757×21 cell} {13150×21 cell}
S.pre_data1 = cellfun(@cell2mat,S.pre_data1,'UniformOutput',false);
S.pre_data1
ans = 2×1 cell array
{13757×21 double} {13150×21 double}

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by