creating a matrix from a vector
조회 수: 4 (최근 30일)
이전 댓글 표시
I have a vector v2=linspace(-30,10,100)
I want to create a matrix M1 that has three columns, each of which is v2 and another matrix M2 that has three rows, each of which is the transpose of v2. I am lost on how to solve this problem. Please help.
댓글 수: 0
채택된 답변
Bruno Luong
2020년 9월 8일
편집: Bruno Luong
2020년 9월 8일
v2=linspace(-30,10,100) % This iis a ROW vector not column
M1 = [v2.', v2.', v2.']
M2 = [v2; v2; v2]
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!