### More Matlab Tricks

Neither Anitha nor Brendan knew about this (I was coding on the fly during our last meeting).

To kill a row in a matrix in Matlab do the following:

>> a = magic(3)

a =

8 1 6

3 5 7

4 9 2

>> a(2, :) = []

a =

8 1 6

4 9 2

Works just as well for columns. You can also remove individual elements, but if you do it in a matrix, you'll end up with a vector.

I titled this "More Matlab Tricks" cuz I had two tricks to record, but forgot the second one.....doh....

To kill a row in a matrix in Matlab do the following:

>> a = magic(3)

a =

8 1 6

3 5 7

4 9 2

>> a(2, :) = []

a =

8 1 6

4 9 2

Works just as well for columns. You can also remove individual elements, but if you do it in a matrix, you'll end up with a vector.

I titled this "More Matlab Tricks" cuz I had two tricks to record, but forgot the second one.....doh....