access data in nested arrays in a structure?

조회 수: 3 (최근 30일)
Najmeh Eskandari
Najmeh Eskandari 2019년 2월 8일
답변: Walter Roberson 2019년 2월 8일
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
madhan ravi
madhan ravi 2019년 2월 8일
Give an example of your desired output.
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에서 Simscape Electrical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by