types = {B0005.cycle.type};
mask = strcmp(types, 'discharge');
discharge_subset = B0005.cycle(mask);
discharge_capacities = arrayfun(@(S) S.data.capacity, discharge_subset);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!