creating a matrix from vectors
조회 수: 2 (최근 30일)
이전 댓글 표시
hallo, i have a vector Ta [12x1] and k[12x1] how could i create a matrix Ta_new [12,31] that the first column is Ta, the second column is Ta+k, the third column would be Ta+2k and so on.. ?
댓글 수: 0
채택된 답변
Alan Stevens
2020년 8월 28일
Here's one way:
Ta_new = Ta;
for i = 1:30
Ta_new = [Ta_new Ta+i*k];
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!