MATLAB: How do i plot a struct with multiple cells

MATLAB

Hi,
How do i plot values in a graph when there are multiple level of cells available in a struct,
Have provided the screenshot below for reference,
Example: say I need to plot cyc0000 to cyc13000 (loop) so that i can plot the voltage to time in each of the cyc.
Thank you.

Best Answer

You can use getfield function to access data in your nested structure, like:
for kk = 0:1300
cyc = sprintf('cyc%04d',kk);
t = getfield(Cell1,cyc,'C1ch','t');
v = getfield(Cell1,cyc,'C1ch','v');
%
% Some process to plot t-v and save for each cycle
%
end