access data in nested arrays in a structure?

1 次查看(过去 30 天)
Hi.
I want to calculate r through structure L:
L=struct('L0',{{[0,0],[0,0],[.5,1,2,3,5,4],[0]},{[0;1],[0,2],[-4,1,2,3,5,10],[2]}});
r=L.L0;
but r=L.L0 is wrong.
i want r={{[0,0],[0,0],[.5,1,2,3,5,4],[0]},{[0;1],[0,2],[-4,1,2,3,5,10],[2]}} but r is L0{1}.
How can i access to L0 ?
  2 个评论
Najmeh Eskandari
Najmeh Eskandari 2019-2-8
I want :
r={{[0,0],[0,0],[.5,1,2,3,5,4],[0]},{[0;1],[0,2],[-4,1,2,3,5,10],[2]}};
but r=L.L0 is:
r={[0,0],[0,0],[.5,1,2,3,5,4],[0]};

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2019-2-8
{L.L0}

更多回答(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