MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to delete a row and a column in a matrix?


m=Array[a,{3,4}];

To delete row 2 and column 3

Drop[Drop[#,{3}]&/@m,{2}]

{{a[1, 1], a[1, 2], a[1, 4]}, {a[3, 1], a[3, 2], a[3, 4]}}

Drop[#,{3}]&/@Drop[m,{2}]

{{a[1, 1], a[1, 2], a[1, 4]}, {a[3, 1], a[3, 2], a[3, 4]}}


Bob Hanlon

---- "hussain.alqahtani at gmail.com" <hussain.alqahtani at gmail.com> wrote: 
> Dear
> 
> I am wondering how to delete a given row and column in a matrix in a
> single command.?
> 
> Your prompt reply is highly appreciated.
> 


  • Prev by Date: Re: Symbolize Problem
  • Next by Date: Re: could someone explain Mathematica's protests about division by zero here?
  • Previous by thread: Re: How to delete a row and a column in a matrix?
  • Next by thread: Re: How to delete a row and a column in a matrix?