matrix columns in matlab
이전 댓글 표시
A = 1*1000 matrix
I need another matrix Y which has all the columns as A
Y = 1000*1000 matrix
How to do that??
댓글 수: 2
Scott MacKenzie
2022년 3월 12일
Use the repmat function to create Y from repeated versions of A
Torsten
2022년 3월 12일
If A is 1x1000 and Y is 1000x1000, Y cannot have all its columns as A since the columns of A have 1 element, the columns of Y have 1000 elements. Y can only have the same rows as A.
답변 (1개)
A = 1:1000
Y = repmat(A.',1,1000)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!