MATLAB: How to access elements of a structure without the use of a loop

structures

Hi everybody,
my question sounds very simple but I cant find a way to have access to elements (values) of a structure without a loop. Here below is what I have done with the help of a loop:
for i=1:length(conf.running)
event1LFS(i)=Running{i}.SP.LFS2LMS;
end
event1LFS=mean(event1LFS);
So if you have a way like the following one (but this one does not work of course), it would be perfect. Thank you
event1LFS=mean(Running{1:end}.SP.LFS2LMS);

Best Answer

event1LFS = mean(cellfun(@(x) x.SP.LFS2LMS, Running));