Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #13854

variables/objects with sequential naming?

From northerndream@gmail.com
Newsgroups comp.soft-sys.math.mathematica
Subject variables/objects with sequential naming?
Date 2013-03-16 07:14 +0000
Message-ID <ki1641$5v0$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

variables/objects with sequential naming? northerndream@gmail.com - 2013-03-16 07:14 +0000
  Re: variables/objects with sequential naming? Stefano Ugliano <northerndream@gmail.com> - 2013-03-18 09:34 +0000

csiph-web