Student Support Forum: 'Eliminating extra outer curly brackets' topicStudent Support Forum > General > "Eliminating extra outer curly brackets"

 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic
 Author Comment/Response Bill Simpson 11/24/12 6:35pm I'm not certain what you want to do with this. Mathematica usually doesn't let "bare" comma separated items stand by themselves. If you are going to use your list of comma separated items within some function call then perhaps this will help you. In[1]:= (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 Out[2]= {{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}} In[3]:= f[Sequence@@%] Out[3]= f[{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}] But you should be able to accomplish the same thing with f@@% URL: ,

 Subject (listing for 'Eliminating extra outer curly brackets') Author Date Posted Eliminating extra outer curly brackets Salvo 11/23/12 6:00pm Re: Eliminating extra outer curly brackets Nasser M. Ab... 11/24/12 4:57pm Re: Eliminating extra outer curly brackets Bill Simpson 11/24/12 6:35pm Re: Eliminating extra outer curly brackets yehuda 11/25/12 07:50am Re: Re: Eliminating extra outer curly brackets Salvo 11/27/12 04:22am Re: Eliminating extra outer curly brackets yehdua 11/28/12 01:24am
 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic