| Author |
Comment/Response |
Salvo
|
11/23/12 6:00pm
Does anyone know how to eliminate my extra unwanted brackets?
I get this output:
{{Subscript[n, 1], 0, 2}, {Subscript[n, 2], 0, 2}, {Subscript[n, 3],
0, 2}, {Subscript[n, 4], 0, 2}, {Subscript[n, 5], 0, 2}, {Subscript[
n, 6], 0, 2}, {Subscript[n, 7], 0, 2}}
I need:
{Subscript[n, 1], 0, 2}, {Subscript[n, 2], 0, 2}, {Subscript[n, 3],
0, 2}, {Subscript[n, 4], 0, 2}, {Subscript[n, 5], 0, 2}, {Subscript[
n, 6], 0, 2}, {Subscript[n, 7], 0, 2}
so no extra brackets. The code is at the bottom. Thanks
(listofindices = {};
For[s = 1, s <= 3, s++,
listofindices = Append[listofindices, {Subscript[n, s], 0, 3 - 1}]];
For[s = 3 + 1, s <= 7, s++,
listofindices =
Append[listofindices, {Subscript[n, s], 0, 5 - 3}]]);
listofindices
URL: satesoro@gmail.com, |
|