Acces double inside cell array

13 visualizaciones (últimos 30 días)
Pavel Cristian Bozieru
Pavel Cristian Bozieru el 26 de Dic. de 2022
Comentada: Pavel Cristian Bozieru el 26 de Dic. de 2022
I have a 1x88 cell array containing different doubles (1000x1, 452x1 or 1842x1). I created a structure with a field and the 1x88 cell array(J). After compilation, next to the field I see the cell (see picture under) and if I click on the cell I see the double. Is there any way that I can acces the double inside the cell through my code and list it directly next to the field so I don't have to click on the cell anymore? So after this, insted of seeing ''J'' and on the right ''1x1 cell'', I would instead see ''J'' and on the right one of the 3 doubles above.
Here is the code:
for i=1:size(Results,1)
Measurements(i).Det=struct('J',{J(i)});
end

Respuesta aceptada

Matt J
Matt J el 26 de Dic. de 2022
Editada: Matt J el 26 de Dic. de 2022
for i=1:size(Results,1)
Measurements(i).Det.J=J{i};
end
  1 comentario
Pavel Cristian Bozieru
Pavel Cristian Bozieru el 26 de Dic. de 2022
Thank you! It solved my issue immediately.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Structures en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by