I have a structure
sa = [1 2 3]; sb = [2 3 4 5]; sc = [9, 6 ,3]; sd = ... % etc. - you got the gist of it
Now I want to apply a function / operation to the data stored in each field and change the contents of the field, i.e. I want to apply
sa = myFun( sa ); sb = myFun( sb ); sc = myFun( sc ); % etc. ...
How can I do this without explicitly writing all the fields as above? I was thinking about structfun - but I'm not sure how to make this modification in place ...
Thanks!
source share