Create a nxn matrix with the same values
조회 수: 19 (최근 30일)
이전 댓글 표시
Hi all, Is there other methods to create an nxn matrix with the same values? I found a method which is
B(1:9, 1:9) = 3
that is perfect but, there is a different method?
댓글 수: 0
채택된 답변
Rick Rosson
2015년 2월 25일
B = 3*ones(9);
댓글 수: 2
Gangadhar Venkata Ramana
2021년 8월 7일
Dear @Rick Rosson
I have been trying to multiply a scalar value to 2D matix inside the batch parallel processing.
I am unable to scale the matrix with the scalar value. An error showing, matix dimensions must agree.
Kindly suggest a solution.
Thank you
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!