How to create a Matrix

2 次查看(过去 30 天)
Omar Eissa
Omar Eissa 2021-5-9
What should i write in the code to create this matrix
  1 个评论
Huma Hafeez
Huma Hafeez 2021-5-24
you can write this in MATLAB like:
A=[22 18 14; 21 17 13; 20 16 12; 19 15 11]
I would suggest you to take MATLAB Fundamentals course, its free

请先登录,再进行评论。

回答(6 个)

David Fletcher
David Fletcher 2021-5-9
A=[22 18 14; 21 17 13; 20 16 12; 19 15 11]
I would recommend you have a look at the Matlab Onramp course. It will give you a good grounding in the basics of Matlab
  3 个评论
David Fletcher
David Fletcher 2021-5-9
Ahh ok - didn't look at the picture. Somebody else has answered anyway.

请先登录,再进行评论。


Mahaveer Singh
Mahaveer Singh 2021-5-19
A=[22:-1:11];
M= reshape(A,4,3)

Andrei Bobrov
Andrei Bobrov 2021-5-9
编辑:Andrei Bobrov 2021-5-9
A = reshape(flip(11:22),4,[])
A = reshape(22:-1:11,4,[])
  4 个评论
Omar Eissa
Omar Eissa 2021-5-9
and what should i do now?
Andrei Bobrov
Andrei Bobrov 2021-5-9
编辑:Andrei Bobrov 2021-5-9
v = 22:-1:11;
A = reshape(v,4,[]);
or
v = 22:-1:10;
n = numel(v);
A = reshape(v(1:n - mod(n,4)),4,[])

请先登录,再进行评论。


fyp matlab
fyp matlab 2021-5-14
Just write this to create this Matrix
A=[22 18 14; 21 17 13; 20 16 12; 19 15 11]

Kartikay Sapra
Kartikay Sapra 2021-5-19
You can use:
A = reshape(22:-1:11, 4, 3)

RAHUL MAURYA
RAHUL MAURYA 2021-5-24
a=[22 28 14;21 17 23;20 16 12;19 15 11]

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by