Results 1 to 2 of 2

Math Help - Accidentally cleared $Path...Mathematica

  1. #1
    Newbie
    Joined
    Sep 2008
    Posts
    9

    Accidentally cleared $Path...Mathematica

    A few questions:

    1. How do I read in a file that is located on my desktop? I accidentally cleared the $Path as well...oops.

    2.I have a data file w/ thousands of points:
    Code:
        0.0237    0.0237    0.0237    0.0237    0.0238    0.0238    0.0237         1
        0.0234    0.0229    0.0234    0.0240    0.0257    0.0288    0.0264         2
        0.0243    0.0263    0.0307    0.0270    0.0232    0.0199    0.0158         3
        0.0203    0.0235    0.0241    0.0247    0.0242    0.0233    0.0265         4
        0.0322    0.0272    0.0224    0.0180    0.0124    0.0215    0.0278         5
        0.0322    0.0380    0.0352    0.0310    0.0271    0.0212    0.0262         6
        0.0302    0.0289    0.0245    0.0275    0.0362    0.0879    0.1695         7
    The first seven columns are acceleration data time-stepped at .005 seconds. They run 1-7 (row 1), 8-14 (row 2) etc.

    I would like to see a plot of acceleration versus time w/ this but the 8th column is just row numbers so I dont want that?

    Thanks
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Aug 2008
    Posts
    903
    Code:
    $Path = Append[$Path, "c:\Math Help Forum"];
    data = ReadList["data1.txt", Number];
    newdata = Select[data, Not[Element[#, Integers]] &]
    points = Table[{newdata[[i]], 0.005 i},
      {i, 1, Length[newdata]}]
    ListPlot[points, Joined -> True]
    Set the path to the file, read the data, select all the data that's not integers using a pure function construct, form the list of points {data,i*0.005}, plot the points.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. path in a manifold
    Posted in the Differential Geometry Forum
    Replies: 3
    Last Post: February 4th 2011, 07:12 AM
  2. u, v-path
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: January 23rd 2011, 01:08 PM
  3. Path Integral
    Posted in the Calculus Forum
    Replies: 2
    Last Post: May 26th 2010, 11:04 PM
  4. Inclination of path
    Posted in the Geometry Forum
    Replies: 2
    Last Post: November 3rd 2009, 05:01 AM
  5. degree of a path, path homotopy.
    Posted in the Differential Geometry Forum
    Replies: 4
    Last Post: March 19th 2009, 06:37 PM

Search Tags


/mathhelpforum @mathhelpforum