concat tall array cells

조회 수: 7 (최근 30일)
Robert Scott
Robert Scott 2021년 8월 3일
답변: Sahil Jain 2021년 9월 1일
so as usually, nothing is easy with matlab
trying to convert a program over to tall cell arrays
and its when i do something as simple as
new_array = tall(old_array)
I get my new_array sure
But alas, it breaks basically every single thing else in the program
For example, strcat doenst work with tall arrays
nor does cat for that matter. What good a data type of tall array do when it breaks every single other function you have used.
  댓글 수: 2
Rik
Rik 2021년 8월 3일
a=tall([1 2]);
b=tall([3 4]);
cat(1,a,b)
ans = 2×2 tall double matrix 1 2 3 4
You probably do need to make sure every array is tall.
Mohammad Sami
Mohammad Sami 2021년 8월 3일
Also you can see all the functions that are supported with tall arrays here.

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

답변 (1개)

Sahil Jain
Sahil Jain 2021년 9월 1일
Hi Robert. As mentioned by other community members, "cat" is supported by tall arrays. However, "strcat" is not currently supported. As a workaround, you can try using the "+" operator to concatenate strings in tall arrays.
str1 = tall(["John ","Mary "]);
str2 = tall(["Smith","Jones"]);
str1 + str2
ans = 1×2 tall string array "John Smith" "Mary Jones"

카테고리

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