フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Matrix manipulation

1 回表示 (過去 30 日間)
Cameron
Cameron 2012 年 2 月 12 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi,
I have an array with one value (I.e. dimensions of 1 x 1) and I need to concatenate with other arrays with dimensions (108 x 1).
How do I add the one value to 108 rows? I.e. convert 1 x 1 array to a 108 x 1 array. Thus allowing e to concatenate the arrays.
Thanks, Cameron.

回答 (1 件)

Rick Rosson
Rick Rosson 2012 年 2 月 12 日
Please try:
x = rand(108,1);
a = 5;
x(end+1) = a;
Or:
y = [ x ; a ];
HTH.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by