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?

 채택된 답변

Rick Rosson
Rick Rosson 2015년 2월 25일

4 개 추천

B = 3*ones(9);

댓글 수: 2

ah! So easy? Sorry. I'm too stupid...
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개)

카테고리

도움말 센터File Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by