+ Reply to Thread
Results 1 to 15 of 15

Full Wave Half Maximum function

  1. #1
    Registered User
    Join Date
    09-29-2018
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    6

    Full Wave Half Maximum function

    Dear all,

    I am currently trying to find the formula to help me compute the FWHM for the given xy data.

    But,

    I only managed to get the first half maximum using

    =Index(1:2,1,Match(C6,2:2,1)),

    I have been troubleshooting for few hours and has yet to find any solution to find the 2nd half.

    May I ask for help in regards to this,
    Many thanks.
    Last edited by exile303; 10-02-2018 at 07:11 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,468

    Re: Full Wave Half Maximum function

    Welcome to the forum!

    What is the FWHM for the given xy data? What exactly are you trying to do?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-27-2018
    Location
    India
    MS-Off Ver
    2013
    Posts
    14

    Re: Full Wave Half Maximum function

    hi,
    if you can provide a sample worksheet for this problem, that will help a lot to understand and answer your question.

    regards
    anup

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Full Wave Half Maximum function

    Hi

    Suppose your xy data in B1:AO2

    To get the value of x that correspond to the first (second ...) max of B2:AO2 try this array formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down.

    Note: ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

    See the file
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-29-2018
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Full Wave Half Maximum function

    Hi,
    Thank you for your responses,

    Let me start by explaining what I am trying to do,

    fwhm.PNG

    As drawn in the picture,

    I have a data of xy data where I am trying to take in the value of the half minimimum in this case,

    And take in the width of the purple color as in x value,

    I was only managed to get the value of the first half minimum (x value) using this,
    =Index(1:2,1,Match(C6,2:2,1)),

    And I am hoping to look for help for the 2nd half minimum to get the (x value),

    PS I am trying to review on solution posted by Mr Jose but still kind of confused.

    Thank you,
    Best regards.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-29-2018
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Full Wave Half Maximum function

    And Sorry,
    C6 should be =A6/2 for this case.
    Last edited by AliGW; 09-30-2018 at 11:30 AM. Reason: Unnecessary quotation removed.

  7. #7
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,378

    Re: Full Wave Half Maximum function

    I think your Full Wave Half Maximum description through me off. What I see you describing is full width half maximum (https://en.wikipedia.org/wiki/Full_w...t_half_maximum ). What specifically do you need help with? Here's what I would probably do:

    1) Finding the Maximum (well, minimum in your case), should be easy since your signal data is fairly clean. If you believe it is clean enough, something like =MIN(2:2) will find the minimum of row 2 data. Similar for row 4. If you think you will need something more complex (from noisy data, for example), then we can figure out what that should be.
    2) Excel, unfortunately, does not have a nice build in linear interpolation function, but I think I would solve for the two x values at half height using a linear interpolation algorithm. I know I have seen a linear interpolation VBA UDF somewhere on this forum (https://www.excelforum.com/excel-pro...ml#post2772517 ). Again, you example shows some pretty clean data. If the data are too noisy, something more elaborate may be needed. At this point, only you know how noisy your data will be.
    2a) Use a lookup function to locate the minimum found in step 1.
    2b) Select two x "guesses" on either side of the minimum.
    2c) Use a numerical algorithm (something like Solver in Excel) and a linear interpolation function to find where y=min/2 by changing x. You will have to run it twice -- once for each side of the minimum.
    3) At that point, the width is simply the difference of the two x values.

    That's an overview of how I would do something like this. Is there a specific step you have trouble with?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  8. #8
    Registered User
    Join Date
    09-29-2018
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Full Wave Half Maximum function

    Thank you MrShorty for your response,

    I am only trying to take in approximate value of FWHM for 2 x values,

    I am not pretty sure about what Linear interpolation is for now, I will try to look into it.

    =INDEX(1:2,1,IFERROR(MATCH(MIN(2:2)/2,2:2,-1),MATCH(MIN(2:2)/2,2:2,-1)))

    I was able to find the first half of x which is 2001.685 using the above function,

    But unable to write another function which help me find the 2nd x value on the other side which approximately would be about 2001.743,

    I am not looking for any complicated code that help me compute the exact value.

    Sorry, I am quite a new learner in excel function and vba coding.
    I hope you can advise me on this,

    Thank you,
    Best regards.

  9. #9
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Full Wave Half Maximum function

    Hi

    To find the correspondent value of A6/2 you can use the following array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Please, confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  10. #10
    Registered User
    Join Date
    09-29-2018
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Full Wave Half Maximum function

    Quote Originally Posted by José Augusto View Post
    Hi

    To find the correspondent value of A6/2 you can use the following array formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Please, confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Hi Mr Jose Augusto,

    Yes,
    The result is similar to my function,

    May I ask if your function could be altered to find the 2nd correspondent value on the right side of the graph??

    Thank you,
    Best regards.

  11. #11
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,378

    Re: Full Wave Half Maximum function

    I think either your function or Jose Augusto's function would work for the other side if you had a copy of the data that was sorted in the opposite direction. If you need Excel to sort for you, Excel will want the data going down rows instead of across columns, so you will need to transpose the data. Transpose is one of the options in paste special, so it should not be overly difficult. Try using that function on two copies of the data. One copy sorted in "ascending" order by x, another copy sorted in descending order by x. The formula applied to the first copy of the list will give you the "left" value. The formula applied to the second copy will give the "right" value.

    Will that work for you?

  12. #12
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Full Wave Half Maximum function

    Hi

    The formulas are in the file I attach.

    My propose for the solution is:

    1) Find Minimum y: -15,084 in column 6715 that correspond to x=2001,714

    2) Find Minimun y/2: -7,542 in column 6743 that correspond to x=2001,742

    3) Find the next value of y in next position that is -7,288 in column 6744 that correspond to x=2001,743 (so we are in the right side, ascending curve)

    4) Find simetric to Min in the left side of curve -7,563, x=2001,686 in position 6687

    5) Iterate in this neighborhood (iteration value in G6) to find the closest value of the other Min / 2 (the same as in 4))

    See the file
    Same formulas are array formulas
    Attached Files Attached Files
    Last edited by José Augusto; 09-30-2018 at 11:17 AM. Reason: Add advise

  13. #13
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Full Wave Half Maximum function

    Hi

    I found another way, more simple, to solve the problem.

    $B7=MIN(2:2)

    Determine a1 such that y = B7 / 2 ± a1 is the minimum of the table, closer to B7 / 2 in the left part of the graph
    Array formula for the left side of the graph:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Do the same in the right part of the graph
    Array formula for the right side of the graph:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Determine the 4 values y = B7 / 2 ± ai
    Determine the x correspondent values of that four values.

    See the file
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-29-2018
    Location
    Singapore
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Full Wave Half Maximum function

    Dear Mr Jose Augusto,

    Thank you very much for your help,

    I will try to analyze the formula that is given to me,

    I really appreciate your help =),
    Best regards.

  15. #15
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Full Wave Half Maximum function

    You're welcome

    I'm happy to have helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA to calculate half day/ full day as per time sheet
    By Avinashch in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-13-2016, 12:54 PM
  2. Replies: 1
    Last Post: 10-20-2014, 03:09 PM
  3. [SOLVED] First unit full price, each one after at half off
    By LaurenF in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2014, 03:01 PM
  4. Replies: 1
    Last Post: 05-03-2013, 04:39 AM
  5. Formula to identify maximum value of peaks in a recurring wave needed
    By elvortex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2012, 05:00 PM
  6. Replies: 4
    Last Post: 02-11-2011, 08:02 AM
  7. Replies: 2
    Last Post: 08-15-2006, 03:20 PM

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