MathGroup Archive 2013

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

Search the Archive

variables/objects with sequential naming?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130167] variables/objects with sequential naming?
  • From: northerndream at gmail.com
  • Date: Sat, 16 Mar 2013 03:15:40 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

Dear all,

the simplest way to explain what I'd like to achieve is to show you the long way I had to go, not knowing how to automate this:

graph1 = Graph[cities, DeleteDuplicates@edges[[1]]];
graph2 = Graph[cities, DeleteDuplicates@edges[[2]]];
graph3 = Graph[cities, DeleteDuplicates@edges[[3]]];
graph4 = Graph[cities, DeleteDuplicates@edges[[4]]];
graph5 = Graph[cities, DeleteDuplicates@edges[[5]]];
graph6 = Graph[cities, DeleteDuplicates@edges[[6]]];
graph7 = Graph[cities, DeleteDuplicates@edges[[7]]];
...

and I think you got the point (no need to paste the whole list!)

I will of course have the same problem on the way around, when I'll want to obtain a table of values for all my graph1, graph2...

I used ToString to produce output files with sequential names, but this... no clue! (googling didn't help either)

Could anywone help?
Thank you
- Stefano



  • Prev by Date: Re: Dynamic application of several polynomials
  • Next by Date: Framelabel without drawing frame
  • Previous by thread: Re: Quit is grayed out in Mathematica 8.0.4
  • Next by thread: Re: variables/objects with sequential naming?