Info

This question is locked. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Help me to solve the question

31 Ansichten (letzte 30 Tage)
N/A
N/A am 30 Okt. 2024 um 7:01
Locked: John D'Errico am 30 Okt. 2024 um 12:16
Create the following matrix B.
21 12 33 14 51 61
B = 17 18 19 10 11 12
19 14 11 13 15 20
Use the matrix B to:
(a) Create a 2 x 4 matrix C such that its first row includes the first two elements and the last two
elements of the first row of B and the second row of C includes the second through the fifth
elements of the third row of B.
(b) Create a 3 x 3 matrix D such that the first, second, and third rows are the first, fourth, and sixth
columns of matrix B

Antworten (1)

Shivam
Shivam am 30 Okt. 2024 um 7:03
Hi Teresa,
Here is the solution of the 2 tasks you mentioned:
% Define the matrix B
B = [21 12 33 14 51 61;
17 18 19 10 11 12;
19 14 11 13 15 20];
% (a) Create matrix C
C = [B(1, [1, 2, 5, 6]);
B(3, 2:5)];
% (b) Create matrix D
D = B(:, [1, 4, 6]);
% Display the results
disp('Matrix C:');
Matrix C:
disp(C);
21 12 51 61 14 11 13 15
disp('Matrix D:');
Matrix D:
disp(D);
21 14 61 17 10 12 19 13 20
  1 Kommentar
John D'Errico
John D'Errico am 30 Okt. 2024 um 12:16
Please don't do student homeworks for them. When no effort has been made, then the student will learn nothing form your efforts, except that there is some sucker willing to do their homework.
You hurt the forum, since now @TERESA has seen that someone will step forwards wnd write their complete assignment for them. And that makes the student keep on doing the same.

This question is locked.

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by