Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Read matrix and create a new one' topicStudent Support Forum > General > Archives > "Read matrix and create a new one"

Help | Reply To Topic
Author Comment/Response
Anton Siswo
03/25/13 9:44pm

I have a question, how to read matrix rows one by one?

I already using command :

rows = Table[assembly[[a]], {a, 16}]
Table[Position[rows, bar][[All, 2]], {bar, 150}]
MatrixForm[Position[rows, 49]]
baris = Flatten[Position[rows, 49], 1]
Table[Position[rows, kol][[All, 2]], {kol, 150}]
MatrixForm[Position[rows, 50]]
kolom = Flatten[Position[rows, 50], 1]
{Table[Position[rows, bar][[All, 2]], {bar, 150}],
Table[Position[rows, kol][[All, 2]], {kol, 150}]}
In the end, I can not simple create matrix 150x150 from my matrix 16x24. How to implement in mathematica?

Thanks you

PS: Here are the assembly matrix:

{1, 2, 3, 4, 5, 6, 10, 11, 12, 7, 8, 9, 31, 32, 33, 34, 35, 36, 40,
41, 42, 37, 38, 39},
{7, 8, 9, 10, 11, 12, 16, 17, 18, 13, 14, 15, 37, 38, 39, 40, 41,
42, 46, 47, 48, 43, 44, 45},
{13, 14, 15, 16, 17, 18, 22, 23, 24, 19, 20, 21, 43, 44, 45, 46, 47,
48, 52, 53, 54, 49, 50, 51},
{19, 20, 21, 22, 23, 24, 28, 29, 30, 25, 26, 27, 49, 50, 51, 52, 53,
54, 58, 59, 60, 55, 56, 57},
{31, 32, 33, 34, 35, 36, 40, 41, 42, 37, 38, 39, 61, 62, 63, 64, 65,
66, 70, 71, 72, 67, 68, 69},
{37, 38, 39, 40, 41, 42, 46, 47, 48, 43, 44, 45, 67, 68, 69, 70, 71,
72, 76, 77, 78, 73, 74, 75},
{43, 44, 45, 46, 47, 48, 52, 53, 54, 49, 50, 51, 73, 74, 75, 76, 77,
78, 82, 83, 84, 79, 80, 81},
{49, 50, 51, 52, 53, 54, 58, 59, 60, 55, 56, 57, 79, 80, 81, 82, 83,
84, 88, 89, 90, 85, 86, 87},
{61, 62, 63, 64, 65, 66, 70, 71, 72, 67, 68, 69, 91, 92, 93, 94, 95,
96, 100, 101, 102, 97, 98, 99},
{67, 68, 69, 70, 71, 72, 76, 77, 78, 73, 74, 75, 97, 98, 99, 100,
101, 102, 106, 107, 108, 103, 104, 105},
{73, 74, 75, 76, 77, 78, 82, 83, 84, 79, 80, 81, 103, 104, 105, 106,
107, 108, 112, 113, 114, 109, 110, 111},
{79, 80, 81, 82, 83, 84, 88, 89, 90, 85, 86, 87, 109, 110, 111, 112,
113, 114, 118, 119, 120, 115, 116, 117},
{91, 92, 93, 94, 95, 96, 100, 101, 102, 97, 98, 99, 121, 122, 123,
124, 125, 126, 130, 131, 132, 127, 128, 129},
{97, 98, 99, 100, 101, 102, 106, 107, 108, 103, 104, 105, 127, 128,
129, 130, 131, 132, 136, 137, 138, 133, 134, 135},
{103, 104, 105, 106, 107, 108, 112, 113, 114, 109, 110, 111, 133,
134, 135, 136, 137, 138, 142, 143, 144, 139, 140, 141},
{109, 110, 111, 112, 113, 114, 118, 119, 120, 115, 116, 117, 139,
140, 141, 142, 143, 144, 148, 149, 150, 145, 146, 147}

URL: ,
Help | Reply To Topic