Recent content by hfrid

  1. H

    MATLAB: Findig period of arbitrary function given a vecor of approximated data

    luckily, we managed to solve this problem without having to calculate the period this way.
  2. H

    MATLAB: Findig period of arbitrary function given a vecor of approximated data

    I noticed that the value changed when changing the interval. Example: when using x = [0:0.01:10]'; in the script above, the output is: mostCommonPeriod = 6.6667 wich has a larger error than when using x = [0:0.01:2*pi]'; When dividing the interval into a larger number of steps MATLAB goes...
  3. H

    MATLAB: Findig period of arbitrary function given a vecor of approximated data

    Thanks for your response! I googled Lomb-Scargle Periodogram and found this MATLAB program: http://www.mathworks.com/matlabcentral/fileexchange/20004-lomb-lomb-scargle-periodogram I wrote the following script x = [0:0.01:2*pi]'; y = [sin(x)]'; [f p Prob] = lomb(x,y,4,1); [~, index] = max(p)...
  4. H

    MATLAB: Findig period of arbitrary function given a vecor of approximated data

    Problem: Given a vector of approximated output for an arbitrary periodic function, find the function's period. Example: Let's say we approximate a solution to the ODE dy/dt = cos(t) using a numerical method (for example Euler's method or MATLAB's ode45), we will get a vector...
Back
Top