I want to apply a function to each row in a cell array. I have a 185 x 1 array (called values), each row with 60000 points. I want to apply the function:
min(findchangepts(x,'MaxNumChanges', 2))
I somewhat understand the cellfun function and can do something simple like finding the mean for each row:
avg = cellfun(@mean, values);
How do I apply this more complex function?

답변 (1개)

George
George 2016년 9월 21일

0 개 추천

Define a function handle and use that as an input to cellfun()

카테고리

도움말 센터File Exchange에서 NaNs에 대해 자세히 알아보기

태그

질문:

2016년 9월 21일

답변:

2016년 9월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by