+ Reply to Thread
Results 1 to 4 of 4

Help With Advance Excel Macro (Fluctuating Sine Wave Values)

  1. #1
    Registered User
    Join Date
    07-28-2011
    Location
    Gainesville, Florida
    MS-Off Ver
    Excel 2007
    Posts
    3

    Help With Advance Excel Macro (Fluctuating Sine Wave Values)

    Hey everyone,

    I am not too familiar with excel functions and was wondering if anyone could help me with my data.

    I am using a one of a kind machine that studies an individuals pain based on their pain ratings. The machine monitors the temperature of a thermode placed on someone's arm based on a pain rating that they give. Everyone's pain rating is different and the machine tries to keep their rating at 20% of what they could tolerate. The data that I end up getting ends up forming a sine wave with fluctuating maximum, intermediate, and minimum points.

    A sample of someone's Temperature data taken every 1.5 seconds may be:

    33
    33.4
    34
    34.7
    35.4
    36
    36.6
    37.3
    37.9
    38.5
    39.1
    39.7
    40.3
    40.9
    41.5
    42.1
    42.7
    43.3
    43.9
    44.5
    45.1
    45.7
    46.3
    46.9
    47.4
    47.5
    46.9
    46.5
    46
    45.8
    46.2
    46.5
    46.9
    47.3
    47.5
    47.7
    47.7
    47.3
    46.8
    46.7
    47.1
    47.4
    47.7
    47.9
    48.1
    47.9
    47.4
    46.9
    46.6
    47
    47.4
    47.7
    48.1
    48.4
    48.6
    48.8
    48.5
    48.1
    47.6
    47.1
    47.5
    47.8
    48.1
    48.5
    48.7
    48.8
    48.7
    48.3
    47.7
    47.2
    47.3
    47.6
    48
    48.3
    48.6
    48.8
    48.9
    48.5
    48
    47.5
    47.1
    47.4
    47.7
    48
    48.4
    48.6
    48.8
    48.9
    48.7
    48.3
    47.7
    47.2
    47.5
    47.8
    48.2
    48.5
    48.7
    48.8
    48.6
    48.2
    47.6
    47.1
    47.1
    47.5
    47.7
    48.1
    48.4
    48.7
    48.7
    48.2
    47.8
    47.4
    47.8
    48.2
    48.5
    48.7
    48.8
    48.4
    48
    47.5
    47.2
    47.5
    47.9
    48.2
    48.4

    If you were to plot this in a graph you can see the maximum and minimum values don't always stay the same.

    I was wondering if it were possible to write some sort of macro that could pull each a maximum, intermediate, and minumum value from each separate wave and place it in a specific cell for later analysis?

    If this seems too confusing, please let me know and I will help clarify.

  2. #2
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Help With Advance Excel Macro (Fluctuating Sine Wave Values)

    Here are a couple ways?
    The code assumes your numbers are in col A if not change the script below to reflect the correct col
    The script will place the max min and median values in cell C1:C3

    Please Login or Register  to view this content.
    Or in a cell you could use these formula's
    Please Login or Register  to view this content.
    Thank You, Mike

    Some Helpful Hints:

    1. New members please read & follow the Forum Rules
    2. Use Code Tags...Place[code]Before the first line and[/code] After the last line.
    3. If you are pleased with a solution mark your post SOLVED.
    4. Thank those who have help you by clicking the scales at the top right of the post.

    Here...

  3. #3
    Registered User
    Join Date
    07-28-2011
    Location
    Gainesville, Florida
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help With Advance Excel Macro (Fluctuating Sine Wave Values)

    Thanks for the input, but the values aren't quite what I was looking for.

    Ill attach a sample file that I have analyzed manually.

    There are cycles that each person goes through. A cycle would be represent by one sine wave. Each cycle has a certain stage.
    Stage 1) Machine reaches high temp (RED)
    Stage 2) Person Rates High Pain (YELLOW)
    Stage 3) Machine reaches low temp (BLUE)
    Stage 4) Person Rates Low Pain (ORANGE)

    I have color coded each high temp/pain, low temp/pain, and guesstimated intermediates for each cycle then recorded them in a chart on the right.

    I know its very complicated. I don't know if it is possible to write a macro to move values from the raw data into a chart like I have added on the right since the values for each person tested are always changing.

    Let me know what you think!
    Thanks
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-28-2011
    Location
    Gainesville, Florida
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Help With Advance Excel Macro (Fluctuating Sine Wave Values)

    bump*************

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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