I'm trying to measure a phase difference between two Sine functions I've acquired with a computer. I'm uploading one of the .txt files with the data I'm working with here: txt file. To remove the units of every row I'm using the function that @R.M posted here.
The first two columns of each file make a Sin function, the other columns make a different one. Here's a plot of those functions togheter:
I'm looking for a way to find all rows that have a maximum value on the second coordinate (that is, second and fourth column) and then be able to manipulate those lists in order to get the difference between the other two coordinates. For example, if this are the two lists with the maximums:
max1={{1.1,6},{2.2,6},{3.3,6},{4.4,6}{5.5,6}}
max2={{1.3,10},{2.4,10}{3.5,},{4.6,10},{5.7,10}}
Then I could easily get the difference between the first coordinates of each pair (1.3-1.1, 2.4-2.2, etc.), which is what I need.
I have tried doing the proposed methods in this question but none of them worked for me.
Furthermore, I got a lot of files like this to analyze, so I'm importing all of them with a For loop and putting them all on the same list with Table
. It would be nice if I could get the maximums of all my files at the same time.
I'll apreciate any ideas, thank you.
Ps.: By the way, by asking and reading the contents of this page I realized Mathematica is a much more powerful tool than I thought, and I would like to learn more about how to properly use it. I know the Mathematica documentation is really good, but I would like to get a good book about Mathematica. Do you know one to reccommend?