Effacer les filtres
Effacer les filtres

accessing tall cell arrays of type char

2 vues (au cours des 30 derniers jours)
Robert Scott
Robert Scott le 6 Août 2021
Commenté : Robert Scott le 6 Août 2021
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

Réponses (1)

Mohammad Sami
Mohammad Sami le 6 Août 2021
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 commentaire
Robert Scott
Robert Scott le 6 Août 2021
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Large Files and Big Data dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by