accessing tall cell arrays of type char

1 次查看(过去 30 天)
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Large Files and Big Data 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by