フィルターのクリア

Using cellfun for multidimensional cell

16 ビュー (過去 30 日間)
Stephen Thompson
Stephen Thompson 2017 年 6 月 19 日
編集済み: the cyclist 2017 年 6 月 19 日
I have a cell of this type:
200×3 cell array
[1×60000 double] [ -0.9365] [154.9924]
[1×60000 double] [ 10.8080] [297.1132]
[1×60000 double] [ 15.5680] [121.3598]
Etc.
I want to use the cusum function, where the second column and third columns are inputs. For a single row this would be:
cusum(this_cell{j}, constant, constant, this_cell{j,2}, this_cell{j,3})
What would be syntax for using cellfun?

採用された回答

the cyclist
the cyclist 2017 年 6 月 19 日
編集済み: the cyclist 2017 年 6 月 19 日
I don't have the Signal Processing Toolbox, so I can't access the cusum function. However, here is a generic example of using three inputs into cellfun, that you should be able to easily craft into your use case:
% The input data
A = {[1 2 3],4,5;
[6 7 8],9,10};
out = cellfun(@(x,y,z)(x.*y.*z),A(:,1),A(:,2),A(:,3),'UniformOutput',false)
I think your equivalent is going to be something like
cellfun(@(x,y,z)(cusum(x,constant1,constant2,y,z)),A(:,1),A(:,2),A(:,3),'UniformOutput',false)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWaveform Generation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by