# Finding peaks in Excel data series

Posted 4 years ago
7102 Views
|
2 Replies
|
0 Total Likes
|
 In Excel 2010 32-bit, suppose I have a data series identified by X (row 1) and Y (row 2):The goal is to identify the peaks (highlighted in yellow) in row 3:Inside a Mathematica notebook, the solution is in (https://reference.wolfram.com/language/ref/FindPeaks.html)Inside Excel using ExcelLink 3.5, what code can I use so that the peaks are marked by "Yes" in row 3? Any help will be much appreciated! Attachments:
2 Replies
Sort By:
Posted 4 years ago
 xlsxData = Import["~FindPeaks.xlsx"][[1]];yesPeaks = DeleteCases[ Table[If[xlsxData[[3, n]] == "Yes", xlsxData[[1 ;; 2, n]], {}], {n, 1, Length[xlsxData[[1, ;;]]]}], {}]ListPlot[{Transpose@xlsxData[[1 ;; 2, 2 ;;]], yesPeaks}, Joined -> {True, False}]
 yesPeaks = DeleteCases[ Table[If[xlsxData[[3, n]] == "Yes", xlsxData[[1 ;; 2, n]], {}], {n, 1, Length[xlsxData[[1, ;;]]]}], {}] ListPlot[{Transpose@xlsxData[[1 ;; 2, 2 ;;]], yesPeaks}, Joined -> {True, False} , Epilog -> {Red, PointSize[0.04], Point[yesPeaks]} ]