How to create a Matrix
Ältere Kommentare anzeigen
What should i write in the code to create this matrix

1 Kommentar
Huma Hafeez
am 24 Mai 2021
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
Antworten (6)
David Fletcher
am 9 Mai 2021
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 Kommentare
Omar Eissa
am 9 Mai 2021
David Fletcher
am 9 Mai 2021
Ahh ok - didn't look at the picture. Somebody else has answered anyway.
Omar Eissa
am 9 Mai 2021
Mahaveer Singh
am 19 Mai 2021
1 Stimme
A=[22:-1:11];
M= reshape(A,4,3)
Andrei Bobrov
am 9 Mai 2021
Bearbeitet: Andrei Bobrov
am 9 Mai 2021
A = reshape(flip(11:22),4,[])
A = reshape(22:-1:11,4,[])
4 Kommentare
Omar Eissa
am 9 Mai 2021
Andrei Bobrov
am 9 Mai 2021
No, just:
A = reshape(v,4,[])
Omar Eissa
am 9 Mai 2021
Andrei Bobrov
am 9 Mai 2021
Bearbeitet: Andrei Bobrov
am 9 Mai 2021
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
am 14 Mai 2021
0 Stimmen
Just write this to create this Matrix
A=[22 18 14; 21 17 13; 20 16 12; 19 15 11]
Kartikay Sapra
am 19 Mai 2021
0 Stimmen
You can use:
A = reshape(22:-1:11, 4, 3)
RAHUL MAURYA
am 24 Mai 2021
a=[22 28 14;21 17 23;20 16 12;19 15 11]
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


