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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTall Arrays についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by