필터 지우기
필터 지우기

Trying to copy a column from a array into a tall array

조회 수: 3 (최근 30일)
Gavin Pugh
Gavin Pugh 2022년 12월 22일
댓글: Gavin Pugh 2023년 1월 4일
Trying to copy a column from a double array into a multi-dimensional tall array:
IrregularRawDataTallArray(:,1, targetColumn) = InputArray(1:InputArraySize(1), sourceColumn)
I've tried some differnet syntax but I get a error:
"In the assignment A(m,n,...) = B, B must be either a scalar value or a tall array. "
This is confusing as isn;t a scalar just a single value - and also I don't want the InputArray to be a Tall Array - does this mean I can't do a vector operation on a tall array?

답변 (1개)

Bora Eryilmaz
Bora Eryilmaz 2022년 12월 22일
편집: Bora Eryilmaz 2022년 12월 22일
Use tall() around the new data column:
T = tall(rand(10,2));
Starting parallel pool (parpool) using the 'Processes' profile ... Connected to the parallel pool (number of workers: 2).
t = rand(10,1);
T(:,2) = tall(t);
  댓글 수: 1
Gavin Pugh
Gavin Pugh 2023년 1월 4일
I tried that but now a error says "Incompatable tall array arguments. The tall arrays must be based on the same datastore." Is it because the tall array comes froma datastore that special rules apply for writing to it?

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

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by