Re: question about matrix
- To: mathgroup at smc.vnet.net
- Subject: [mg63843] Re: question about matrix
- From: BGHEkaya at gmail.com
- Date: Thu, 19 Jan 2006 00:02:39 -0500 (EST)
- References: <dqkrvj$pqn$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Suppose your matrix is called myMatrix. Then to delete columns of zeros
use
myMatrix=Transpose[DeleteCases[Transpose[myMatrix], Table[0,
{First[Dimensions[
myMatrix]]}]]]
Then to delete rows of zeros
myMatrix=DeleteCases[myMatrix, Table[0, {Last[Dimensions[
myMatrix]]}]]
Cheers,
Brian