+ Reply to Thread
Results 1 to 3 of 3

algorithm/macro for working with long data column

  1. #1
    Registered User
    Join Date
    07-09-2010
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    1

    algorithm/macro for working with long data column

    I am new here so please take it easy on me!

    I have a column of data (time series) which happens to be ankle angle measured during walking. There are 6000 data in the column which represents about 100 steps.

    I want to calculate the range of motion for each step - that is, minus the minimum angle from the maximum angle for each step.

    My major problem is how to use excel to 'define' each step - so that I can calculate a separate maximum and minimum. In other words, I need to be able to split the column into multiple arrays which represent each step.

    In the attached file I have noted the first stride on a graph with two red bars and used the stars to highlight the two points I need (the maxima and minima of that range). I have noted that each stride seems to be about 50 samples long. Ideally I would like to have this number located in a cell so that I could change it and see the effect on the calculations (for example it will be a shorter range if used on running data).

    Hope that makes sense.

    Thanks for any help.
    Attached Files Attached Files
    Last edited by murf58; 07-10-2010 at 11:24 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    re: algorithm/macro for working with long data column

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    EDITED THIS TIME ONLY
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Need help with algorithm/macro for working with long data column

    Quote Originally Posted by murf58
    In the attached file I have noted the first stride on a graph with two red bars and used the stars to highlight the two points I need
    I can't see that in the current attachment I'm afraid - just the data points.

    Quote Originally Posted by murf58
    I have noted that each stride seems to be about 50 samples long. Ideally I would like to have this number located in a cell so that I could change it and see the effect on the calculations (for example it will be a shorter range if used on running data).
    This is a key point - so are you saying you intend to base each step on this arbitrary input cell (eg 50) as opposed to using some logic or other to establish each step separately based on the 6000 data points ?

    If that is the case then what you want to do should be relatively straightforward - you just need to use an INDEX (or Volatile OFFSET) statement to create the various ranges for use in conjunction with MIN/MAX.

    If we assume (using sample) that C1 holds 50 (step value) then:

    Please Login or Register  to view this content.
    With the above in place (to help us identify how many calcs need to be performed) then:

    Please Login or Register  to view this content.
    C2:C351 can be copied to D2:D351 with MIN changed to MAX.

    As you alter C1 you should find that the results in C2:D2 onwards adjust accordingly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1