Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Matrix manipulation
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Rick Rosson
2012년 2월 12일
Please try:
x = rand(108,1);
a = 5;
x(end+1) = a;
Or:
y = [ x ; a ];
HTH.
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!