How to use the parameters of other functions within the ‘cellfun’ function?

1 view (last 30 days)
Fercho_Sala
Fercho_Sala on 29 Apr 2021
Commented: Fercho_Sala on 29 Apr 2021
Hello guys, just a simple question. I don’t find the way how to use the parameters ‘movemedian’ , ‘lowess’ and so on .. belonging to the ‘smoothdata’ function inside the ‘cellfun’ , how can you do this? Thank you.
x=cellfun(@smoothdata,C1,('movemedian',100),'UniformOutput',false); %there is a mistake here calling the parameters for 'smoothdata'

Accepted Answer

Stephen23
Stephen23 on 29 Apr 2021
Edited: Stephen23 on 29 Apr 2021
f = @(a)smoothdata(a,'movemedian',100);
x = cellfun(f,C1,'UniformOutput',false);
  9 Comments

Sign in to comment.

More Answers (0)

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!