How do i plot a struct with multiple cells

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.

 Respuesta aceptada

Akira Agata
Akira Agata el 28 de Mzo. de 2018
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

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 28 de Mzo. de 2018

Respondida:

el 28 de Mzo. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by