Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to do this in Mathematica?

  1. Dec 21, 2009 #1
    How to do this in Mathematica??

    Hi - I am an engineering student who is quite new to Mathematica (v. 6) but I really enjoy it. Lots of examples, easy to just play and figure out how to do something for yourself. Makes beautiful output. However, I have not been able to figure this out...
    I am using another program (COMSOL) which will export values from a graph as a text file - eg "Data.txt". I use list1 = ReadList["where_the_file_is_located/Data.txt", {Number, Number}] to read the date into a list. Then I use ListPlot[{list1}, PlotRange -> {0, as_big_as_I_need}] and it plots very nicely.
    However, I cannot figure out how to manipulate individual members in my list (i.e. multiply all the x-values [the first "Number"] by something. How can I manipulate all the first or the second "Number(s)" in a list like this?

  2. jcsd
  3. Dec 23, 2009 #2


    Staff: Mentor

    Re: How to do this in Mathematica??

    list[[All,2]] would give a list of all of the second elements
  4. Dec 30, 2009 #3
    Re: How to do this in Mathematica??

    Perfect thanks!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook