I have some force/time data for jumping tasks where anytime the force value = 0, they are in the air. I am looking for peak force during the propulsion phase of the jump, so before it reads 0 or less than 0. I can't just use the max() function because landing force is almost always greater than propulsion force. I don't want to trim the data, because max landing force is another variable of interest. I don't want to do this manually because I will have a large sample. Any ideas how I can return the max value for the propulsion force or max value prior to force values of 0? Thanks
Here's some sample data (the real data collects at 1000 data points per second, so I had to just make something similar to the force/time curve here). So here I would be looking for the max value prior to 0 or 10s. example