accessing tall cell arrays of type char

조회 수: 2(최근 30일)
Robert Scott
Robert Scott 2021년 8월 6일
댓글: Robert Scott 2021년 8월 6일
so i am doing some experiments with tall cell arrays
normally with a cell array to gain access to the data i need to say like
array{1,2} and i get back whatever
However, apparently, brackets are not supported by tall arrays.
So my question is?????? How the heck do i get to chars in the cell array if i cant use {} brackets?
I cant seem to find any info anywhere unless i missed it.
Thanks in advance

답변(1개)

Mohammad Sami
Mohammad Sami 2021년 8월 6일
You will need to use gather function after you have completed all the operations on the data.
a = tall({'aa' 'bb' 'cc'; 'dd' 'ee' 'ff'; 'gg' 'hh' 'ii'});
b = a(1,1:2);
gather(b)
Evaluating tall expression using the Local MATLAB Session: - Pass 1 of 1: Completed in 0.41 sec Evaluation completed in 0.79 sec
ans = 1×2 cell array
{'aa'} {'bb'}
  댓글 수: 1
Robert Scott
Robert Scott 2021년 8월 6일
Can you explain what you mean? I am trying to convert a program to tall arrays because my data set is to large. So the first step i took was simply to convert my data to tall arrays
However, i have a loop that does work on the tall array after its formed. Some of the work are simply things like strcat(array{1,2},array{1,3})
However i cant do that because it says indexing with brackets is not supported. So i was trying to do it other ways
Maybe the answer is it will work if i call gather later?
What do you mean by completed all operations? I am trying to understand the documentation about gather completed work that is qued up essentially but a bit unclear.

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by