필터 지우기
필터 지우기

access element of an array of an array

조회 수: 1 (최근 30일)
Shiva Khanal
Shiva Khanal 2019년 2월 7일
편집: Andrey Kiselnikov 2019년 2월 7일
i am new to matlab.i want to access element of an array which is inside another array.
FOr example,
a is 1 by 10 cell and inside that each cell has 1 by 1000 cell
so i want to play with that each element of (1 by 1000) cell which is inside of first cell,
my problem is i couldnt do this.

답변 (1개)

Andrey Kiselnikov
Andrey Kiselnikov 2019년 2월 7일
편집: Andrey Kiselnikov 2019년 2월 7일
myCellArray = {{1:1000},{1:1000}}; % Creates a simle cell array of two cells that contains two cells
myCellArray{1}{1} % Will return the frist cell e.g. the numbers from 1 to 1000 will be printed
myCellArray{1}{1}(123) % Will return the 123'd element of the first cell of your cell array, So the number '123' will be printed

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by