How to apply butterworth filter to a cell array?

3 ビュー (過去 30 日間)
Tomaszzz
Tomaszzz 2022 年 2 月 21 日
コメント済み: Tomaszzz 2022 年 2 月 21 日
Hi all,
I have a 7x1 cell for which I would like to apply a butterworth filter to all cell arrays. Any idea how to do it?
filtfilt(b,a,mycell{:,1:7});
Index in position 2 exceeds array bounds (must not exceed 1).
Thanks

採用された回答

Jan
Jan 2022 年 2 月 21 日
You cell has the size {7x1}, not {1x7}.
filter needs one numerical vector or matrix as input. So use a loop:
result = cell(1, 7);
for k = 1:7
result{k} = filter(b, a, T_or_x_cycle{k});
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by