Acces double inside cell array

조회 수: 13 (최근 30일)
Pavel Cristian Bozieru
Pavel Cristian Bozieru 2022년 12월 26일
댓글: Pavel Cristian Bozieru 2022년 12월 26일
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

채택된 답변

Matt J
Matt J 2022년 12월 26일
편집: Matt J 2022년 12월 26일
for i=1:size(Results,1)
Measurements(i).Det.J=J{i};
end
  댓글 수: 1
Pavel Cristian Bozieru
Pavel Cristian Bozieru 2022년 12월 26일
Thank you! It solved my issue immediately.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Structures에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by