+ Reply to Thread
Results 1 to 17 of 17

average amplitude

  1. #1
    Registered User
    Join Date
    06-18-2017
    Location
    Newcastle upon Tyne, UK
    MS-Off Ver
    Excel 2016
    Posts
    9

    Talking average amplitude

    Hi,

    I would like to know how to find the average amplitude for heave and pitch motions by using "if" function.
    Attached Files Attached Files
    Last edited by May Thu Htet; 06-22-2017 at 10:47 AM. Reason: attached file edited

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: average amplitude

    Why do you want to use the IF function?

    Average heave =AVERAGE(F23:F822)
    Average pitch =AVERAGE(G23:G822)

    or am I missing something?

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: average amplitude

    If you are asking for the average of heave when x (Col A) is (for example) between 6 and 8.

    =SUMIFS(F23:F822,A23:A822, ">=6", A23:A822,"<=8")/COUNTIFS(A23:A822, ">=6", A23:A822,"<=8")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: average amplitude

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

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


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    Registered User
    Join Date
    06-18-2017
    Location
    Newcastle upon Tyne, UK
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: average amplitude

    Quote Originally Posted by ChemistB View Post
    If you are asking for the average of heave when x (Col A) is (for example) between 6 and 8.

    =SUMIFS(F23:F822,A23:A822, ">=6", A23:A822,"<=8")/COUNTIFS(A23:A822, ">=6", A23:A822,"<=8")
    Thank you for your reply, ChemistB. I also would like to know how to find average of maxima and minima of heave since my data is time dependent data and the results in column F and G are not direct amplitude, we need to find maximum and minimum for amplitude and then find average. This data analysis is necessary for my dissertation and I would appreciate if you would help me. Thank you so much.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: average amplitude

    It is not clear to me what you are looking for or exactly what you need help with. It is clear to me that this kind of "signal processing" is almost certainly more than just a simple IF() function. Perhaps a few questions to promote some discussion and reflection and research:

    1) How would you do this by hand? I often find that part of programming a problem is to first understand how I would work the problem by hand, then I can work on "translating" those steps and procedures into my desired programming language.
    1a) If you already have an established procedure, describe that procedure to us and we should be able to help you program that in Excel. Better yet, Specifically identify the steps that you can do and those you can't so our responses and assistance can focus on the parts you need help with without the need to address the issues you already know how to do.
    1b) If you do not yet have an established procedure, some research into signal processing algorithms, and how they are used to measure amplitude (and frequency and other such parameters) could be useful. I suspect there are a few different algorithms and procedures, with advantages and disadvantages for each. I would not be surprised if this is the kind of question you might face when you defend the dissertation -- why did you choose this algorithm for processing peaks/troughs over other algorithms.
    2) How are you defining amplitude? A standard trig function (y=Asin(B) for example), A is the amplitude and determines/measures how far above "baseline 0" the function's peaks occur. I could also see defining amplitude as the distance between trough and peak.
    3) Your question in post #5 asks about finding peaks and troughs. How do you normally find peaks and troughs (or max/min)? I tend to use what I learned in calculus (max/min occur where the function's slope/1st derivative is 0), which usually means a column to compute slope/derivative, which can then serve as a basis for locating where the max/min peaks/troughs occur.
    4) I have no experience with Fourier transforms, but it seems possible that a Fourier regression might have a parameter (or combination of parameters) that could be interpreted as "average amplitude". If your research for part 1 suggests that Fourier transforms/regressions are applicable here, then you can research how to implement this analysis in Excel (such as this example by user shg: https://www.excelforum.com/excel-cha...dal-curve.html ).

    Those are my thoughts on the problem. Do they help at all?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: average amplitude

    Not sure that this is what you want but it divides the maximum displacement by 2:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: average amplitude

    Thanks for the rep! Did that help?

  9. #9
    Registered User
    Join Date
    06-18-2017
    Location
    Newcastle upon Tyne, UK
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: average amplitude

    Quote Originally Posted by MrShorty View Post
    It is not clear to me what you are looking for or exactly what you need help with. It is clear to me that this kind of "signal processing" is almost certainly more than just a simple IF() function. Perhaps a few questions to promote some discussion and reflection and research:

    1) How would you do this by hand? I often find that part of programming a problem is to first understand how I would work the problem by hand, then I can work on "translating" those steps and procedures into my desired programming language.
    1a) If you already have an established procedure, describe that procedure to us and we should be able to help you program that in Excel. Better yet, Specifically identify the steps that you can do and those you can't so our responses and assistance can focus on the parts you need help with without the need to address the issues you already know how to do.
    1b) If you do not yet have an established procedure, some research into signal processing algorithms, and how they are used to measure amplitude (and frequency and other such parameters) could be useful. I suspect there are a few different algorithms and procedures, with advantages and disadvantages for each. I would not be surprised if this is the kind of question you might face when you defend the dissertation -- why did you choose this algorithm for processing peaks/troughs over other algorithms.
    2) How are you defining amplitude? A standard trig function (y=Asin(B) for example), A is the amplitude and determines/measures how far above "baseline 0" the function's peaks occur. I could also see defining amplitude as the distance between trough and peak.
    3) Your question in post #5 asks about finding peaks and troughs. How do you normally find peaks and troughs (or max/min)? I tend to use what I learned in calculus (max/min occur where the function's slope/1st derivative is 0), which usually means a column to compute slope/derivative, which can then serve as a basis for locating where the max/min peaks/troughs occur.
    4) I have no experience with Fourier transforms, but it seems possible that a Fourier regression might have a parameter (or combination of parameters) that could be interpreted as "average amplitude". If your research for part 1 suggests that Fourier transforms/regressions are applicable here, then you can research how to implement this analysis in Excel (such as this example by user shg: https://www.excelforum.com/excel-cha...dal-curve.html ).

    Those are my thoughts on the problem. Do they help at all?
    Hello MrShorty,

    Thank you for your explanation. My procedure just considered now is to find the nature of result(curve) by using "if" function and then find the maximum and minimum point along the curve(result over time). Next step is to find the amplitude(distance between trough and peak) and then find average. However the procedure is time consuming and I have another 71 result files to solve. I just now updated my excel file and you can see at the top. Thanks again for your help.

    Regards
    May

  10. #10
    Registered User
    Join Date
    06-18-2017
    Location
    Newcastle upon Tyne, UK
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: average amplitude

    Quote Originally Posted by xladept View Post
    Thanks for the rep! Did that help?
    Hi xladept,

    Yes, helped a lot. Thank you.

  11. #11
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: average amplitude

    just now updated my excel file and you can see at the top.
    Sample file got lost in the edit?

  12. #12
    Registered User
    Join Date
    06-18-2017
    Location
    Newcastle upon Tyne, UK
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: average amplitude

    Quote Originally Posted by MrShorty View Post
    Sample file got lost in the edit?
    Sorry, did not realize that. I just uploaded again now.

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: average amplitude

    With the understanding that we are looking for the "distance between trough and peak" (Post #9), or the distance between the local minima and its corresponding local maxima, as Mr. Shorty stated earlier, this proposed method uses several helper columns with relatively simple formulas.
    To find prospective local maximas for heave (column K): =IF(AND(F23>=F22,F23>F24),F23,"")
    To find prospective local minimas for heave (L): =IF(AND(F23<F22,F23<=F24),F23,"")
    To find corresponding prospective local maiximas and minimas (M and N): =IFERROR(INDEX(K$23:K$822,AGGREGATE(15,6,(ROW(K$23:K$822)-22)/(K$23:K$822<>""),ROW(A1))),"") =IFERROR(INDEX(L$23:L$822,AGGREGATE(15,6,(ROW(L$23:L$822)-22)/(L$23:L$822<>""),ROW(B1))),"")
    To find the height of each prospective wave (O): =IFERROR(M23-N23,"")
    To find the average ignoring plateaus (P23): =AVERAGEIFS(O23:O140,O23:O140,">"&0)
    The formulas for Pitch are similar.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  14. #14
    Registered User
    Join Date
    06-18-2017
    Location
    Newcastle upon Tyne, UK
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: average amplitude

    Quote Originally Posted by JeteMc View Post
    With the understanding that we are looking for the "distance between trough and peak" (Post #9), or the distance between the local minima and its corresponding local maxima, as Mr. Shorty stated earlier, this proposed method uses several helper columns with relatively simple formulas.
    To find prospective local maximas for heave (column K): =IF(AND(F23>=F22,F23>F24),F23,"")
    To find prospective local minimas for heave (L): =IF(AND(F23<F22,F23<=F24),F23,"")
    To find corresponding prospective local maiximas and minimas (M and N): =IFERROR(INDEX(K$23:K$822,AGGREGATE(15,6,(ROW(K$23:K$822)-22)/(K$23:K$822<>""),ROW(A1))),"") =IFERROR(INDEX(L$23:L$822,AGGREGATE(15,6,(ROW(L$23:L$822)-22)/(L$23:L$822<>""),ROW(B1))),"")
    To find the height of each prospective wave (O): =IFERROR(M23-N23,"")
    To find the average ignoring plateaus (P23): =AVERAGEIFS(O23:O140,O23:O140,">"&0)
    The formulas for Pitch are similar.
    Let us know if you have any questions.
    Hi JeteMc,

    I am not sure why you used Aggregate(15,6,...) for both maxima and minima. 15 is for small, right? Is it 14 for large(maximum)? I also do not get the term "(ROW(K$23:K$822)-22)/(K$23:K$822<>"") and Row(A1)used in index function. Could you explain these please? Also how can I find the equation that you showed on the curve? That is great , cool.

    Regards
    May
    Last edited by May Thu Htet; 06-21-2017 at 04:38 PM.

  15. #15
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: average amplitude

    Yes, 15 is for Small and 14 for Large however the formula is looking for the rows with values in columns K (and L), not for local maxima and minima in column F.
    ...(ROW(K$23:K$822)-22)/(K$23:K$822<>"") is the part of the equation that sets up an array of row numbers that have values and reports #Div/0 for those that do not (which the 6 causes the AGGREGATE function to ignore).
    ...ROW(A1) returns the number 1 so that, for example, cell M23 will display the first maxima is in the 5th row of the range K23:K822, cell M24, ROW(A2), displays the second maxima is in the 17th row etc.
    Notice that N23 and N24 display the first and second minimas.
    One way to see what the formula is doing is to use the Evaluate Formula feature found on the Formulas tab. I would suggest selecting in turn cells M23, N23, M24 and N24 to get a sense of what is going on.
    As far as the equation on the graph, it is an option of the format trendline dialog box which will come up if you right click the trendline (black) on either chart. Toward the bottom of the dialog box you'll notice that 'Display equation on chart' has been selected.
    Let us know if you have any questions.

  16. #16
    Registered User
    Join Date
    06-18-2017
    Location
    Newcastle upon Tyne, UK
    MS-Off Ver
    Excel 2016
    Posts
    9

    Re: average amplitude

    Quote Originally Posted by JeteMc View Post
    Yes, 15 is for Small and 14 for Large however the formula is looking for the rows with values in columns K (and L), not for local maxima and minima in column F.
    ...(ROW(K$23:K$822)-22)/(K$23:K$822<>"") is the part of the equation that sets up an array of row numbers that have values and reports #Div/0 for those that do not (which the 6 causes the AGGREGATE function to ignore).
    ...ROW(A1) returns the number 1 so that, for example, cell M23 will display the first maxima is in the 5th row of the range K23:K822, cell M24, ROW(A2), displays the second maxima is in the 17th row etc.
    Notice that N23 and N24 display the first and second minimas.
    One way to see what the formula is doing is to use the Evaluate Formula feature found on the Formulas tab. I would suggest selecting in turn cells M23, N23, M24 and N24 to get a sense of what is going on.
    As far as the equation on the graph, it is an option of the format trendline dialog box which will come up if you right click the trendline (black) on either chart. Toward the bottom of the dialog box you'll notice that 'Display equation on chart' has been selected.
    Let us know if you have any questions.
    Thank you so much Helped me a lot.

  17. #17
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: average amplitude

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. average amplitude
    By May Thu Htet in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-18-2017, 10:13 AM
  2. [SOLVED] Find Average, Return Column Header of Number Closest To Average
    By djmyers in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-07-2013, 04:19 PM
  3. How to find amplitude on diagonal curve?
    By BillBradsky in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 04-04-2013, 10:17 AM
  4. Replies: 5
    Last Post: 09-12-2011, 04:14 PM
  5. Amplitude??
    By dimitrovi.mini in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-26-2009, 06:39 PM
  6. Plot R-Theta [angle (0~360 degrees) and amplitude] chart in Excel
    By Wes12 in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 01-28-2006, 08:35 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