What should i write in the code to create this matrix

댓글 수: 1

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일

1 개 추천

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

Omar Eissa
Omar Eissa 2021년 5월 9일
The issue is that i have a certain code with missing parts
David Fletcher
David Fletcher 2021년 5월 9일
Ahh ok - didn't look at the picture. Somebody else has answered anyway.
Omar Eissa
Omar Eissa 2021년 5월 9일
thank you

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

Mahaveer Singh
Mahaveer Singh 2021년 5월 19일

1 개 추천

A=[22:-1:11];
M= reshape(A,4,3)
Andrei Bobrov
Andrei Bobrov 2021년 5월 9일
편집: Andrei Bobrov 2021년 5월 9일

0 개 추천

A = reshape(flip(11:22),4,[])
A = reshape(22:-1:11,4,[])

댓글 수: 4

Omar Eissa
Omar Eissa 2021년 5월 9일
so to reshape this
v = [22:-1:10]
v =
22 21 20 19 18 17 16 15 14 13 12 11 10
into this
i should write this code
A = reshape(flip(11:22),4,[])
No, just:
A = reshape(v,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일

0 개 추천

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일

0 개 추천

You can use:
A = reshape(22:-1:11, 4, 3)
RAHUL MAURYA
RAHUL MAURYA 2021년 5월 24일

0 개 추천

a=[22 28 14;21 17 23;20 16 12;19 15 11]

카테고리

도움말 센터File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품

태그

질문:

2021년 5월 9일

댓글:

2021년 5월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by