Trying to copy a column from a array into a tall array
1 回表示 (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
Bora Eryilmaz
2022 年 12 月 22 日
編集済み: Bora Eryilmaz
2022 年 12 月 22 日
Use tall() around the new data column:
T = tall(rand(10,2));
t = rand(10,1);
T(:,2) = tall(t);
参考
カテゴリ
Help Center および File Exchange で Tall Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!