1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding an oscillator's period with a dataset in Mathematica

  1. Jan 15, 2009 #1
    1. The problem statement, all variables and given/known data
    I have a dataset of an oscillator with 51 measurements, I uploaded it http://home.orange.nl/~kuip3148/osc.dat [Broken]. It's in the form of {time, position}. I have to find the period of this oscillator in Mathematica.

    2. Relevant equations
    I have to use the NonLinearRegress function to find it.


    3. The attempt at a solution
    I started with the following code:
    Code (Text):
    data = {oscdata};
    {tdata, xdata} = Transpose[data]
    1. The problem statement, all variables and given/known data
    That gives me the first problem, because I get an error saying the two lists are not the same shape, while they clearly are. Anyone know why that's happening?

    Code (Text):
    "Lists {tdata,xdata} and \
    {{{0,0.369}},{{0.1,0.0999}},{{0.2,0.0904}},{{0.3,-0.054}},{{0.4,-0.1}}\
    ,{{0.5,-<<6>>}},{{0.6,-0.328}},{{0.7,-0.388}},{{0.8,-0.486}},{{0.9,-0.\
    576}},<<51>>} are not the same shape"
     
    Last edited by a moderator: May 3, 2017
  2. jcsd
  3. Jan 16, 2009 #2

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    That's strange, it worked perfectly here

    Code (Text):
    data = Import["[PLAIN]http://home.orange.nl/~kuip3148/osc.dat"][/PLAIN] [Broken]
    {tdata, xdata} = Transpose[data]
     
    Last edited by a moderator: May 3, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Finding an oscillator's period with a dataset in Mathematica
  1. Period of oscillation (Replies: 8)

  2. Period of oscillation (Replies: 3)

Loading...