How to construct matrix?

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];

回答(2 个)

FraFal
FraFal 2019-12-8

0 个投票

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

0 个投票

This seems like a good idea, but I can't seem to run the script.

类别

帮助中心File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

评论:

Rik
2019-12-8

Community Treasure Hunt

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

Start Hunting!

Translated by