Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Building a table out of two lists' topicStudent Support Forum > General > "Building a table out of two lists"

Next Comment >Help | Reply To Topic
Author Comment/Response
Truman
04/02/12 09:44am

Hi all, let me give a brief rundown of my problem.

I am trying to write a simple program to take the Data element from an audio file, derive a list of x values from the length of the track (e.g. a list from 0 to some length where each data point is assigned to an x value) and then associate the data points with their corresponding x value. I would then like to export this table for the purpose of doing a fourier transform with another program.

So here is the progress I have made. Importing the data points is incredibly easy. Just Import the Data element from the audio file. Done. The problem is that it seems to be treating the data as an object of length (blah) instead of as a list of separate data points. I tried to simply do the List command to see if I could get it to make an actual list of values, but that did not work. As well using Table treated it as a single unit.

Creating the x value list was also pretty easy, just read the length of the Data list, then use Table in the format Table[i, 0, Length[dataList]-1, 1] to tell it make a table starting at 0 that goes for the entire length of the Data in increments of one. After this I could recast as a list but that makes it start handling as a single unit as well.

So having said all that, now what I need is a method to combine the two lists into a single table. I do not think that Join works here because that just concatenates the two lists, creating a big list and not assigning the data value with an X value. Normally one might just stick the data in a list, but for Fourier transforms you need a discrete list of x values or you cannot do the math.

URL: ,

Subject (listing for 'Building a table out of two lists')
Author Date Posted
Building a table out of two lists Truman 04/02/12 09:44am
Re: Building a table out of two lists yehuda 04/03/12 00:03am
Re: Building a table out of two lists Bill Simpson 04/03/12 02:35am
Next Comment >Help | Reply To Topic