How to construct matrix?

조회 수: 8 (최근 30일)
Jenny Andersen
Jenny Andersen 2019년 12월 8일
댓글: Rik 2019년 12월 8일
So I have written the following 4*3 matrix but I want to construct it with 'ones' and '.*' but I am unsure how to.
[12 2 1; 4 12 1; 6 2 1; 2 4 1];
  댓글 수: 1
Rik
Rik 2019년 12월 8일
What exactly is your goal?

댓글을 달려면 로그인하십시오.

답변 (2개)

FraFal
FraFal 2019년 12월 8일
Hi,
I don't know if I understood correctly, but you can concatenate two matrices:
  • M1 = ones( size(M) ); --> matrix of '1';
  • M2 = sym('.*',[4 3]); --> symbolic matrix 4x3;
BR,
FraFal

Jenny Andersen
Jenny Andersen 2019년 12월 8일
편집: Jenny Andersen 2019년 12월 8일
This seems like a good idea, but I can't seem to run the script.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by