- #1
gfd43tg
Gold Member
- 950
- 50
Homework Statement
I'm working on problem 1, specifically part (d) in the attached PDF file. I will show my code for (a) - (c) so you can see where I am coming from
Homework Equations
The Attempt at a Solution
(a)
Code:
A1 = [1.3 5.2; 7.4 3.8; 9 2]
A1 =
1.3000 5.2000
7.4000 3.8000
9.0000 2.0000
Code:
A1(2)
ans =
7.4000
(c)
Code:
B = [1 1 1];
A3 = [A1 B']
A3 =
1.3000 5.2000 1.0000
7.4000 3.8000 1.0000
9.0000 2.0000 1.0000
(d)
I don't know how to add a row into the array for any given row. I know if I wanted to add for example [0 0] to the end of the row
Code:
C = [0 0]
C =
0 0
A4 = [A1; C]
A4 =
1.3000 5.2000
7.4000 3.8000
9.0000 2.0000
0 0
but I just need to move that [0 0] into the second row
Attachments
Last edited: