Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'name the elements of a list with another list' topicStudent Support Forum > General > Archives > "name the elements of a list with another list"

Next Comment >Help | Reply To Topic
Author Comment/Response
Jeremie
02/28/13 1:36pm

How to name the elements of a list with the elements of another list? (see explanation)
I've done a program that import text files, read them and make a list of the data and another list with the name of the files and now I would like to each list of the data list with the corresponding file name of the second list. But it's where I got problem.
here's an example to clarify:
let's say I have the following lists named m and n:
m = {{1, 1}, {2, 2}, {3, 3}}
n = {a, b, c}
if I write then: n=m
it just replace each elements of n by the elements of m.
if I write: {a, b, c}={{1, 1}, {2, 2}, {3, 3}}
then it does what I want: the list {1,1} is asigned to the variable a
so How can we get this result with using the names of the lists: m and n ???

Any idea would be welcome!

URL: ,

Subject (listing for 'name the elements of a list with another list')
Author Date Posted
name the elements of a list with another list Jeremie 02/28/13 1:36pm
Re: name the elements of a list with another list jf 02/28/13 6:12pm
Re: Re: name the elements of a list with anothe... Jeremie 03/01/13 00:37am
Re: Re: Re: name the elements of a list with an... jf 03/01/13 09:51am
Next Comment >Help | Reply To Topic