Finding the total number of zeros
2 views (last 30 days)
Show older comments
Commented: Benjamin Avants on 13 May 2014
I am trying to work out the time of flight from this excel data. This is a typical set of data that I have gained from a trial. The force plate was zeroed whilst the person was stood on the force plate hence the zeros at the start.
I am trying to find the set of zeros in a multiple number of excel spreadsheets for where they were in the air. However this data has multiple blocks of zeros and not all of these apply.
I have been told to use a find function to find the max value (the max value in this case would be a minus value due to force being exerted downwards) then 10N either side of this and then counting the zeros after this. However I do not think this will work as the max value is no where near the block of zeros.
Can anyone help?!
Looking through your sample data, this could be a little tricky.
I plotted the data and it looks like the jump takes place before the greatest magnitude of down force and that the time in the air is actually when the force plate has the highest positive values.
I would suggest using the max() function to find that value and then the find function to find all data points greater than the max - 10. The number of points found would be the time in the air, based on the instructions you mentioned in your post.
myMax = max(data(:,5));
vals = find(data(:,5) > (myMax - 10));
pointsInAir = numel(vals);
If you know how much time each data point represents, you can then calculate air time.
The -10 is to account for the 10 N you mentioned in your question... I was assuming units were in Newtons.
I was also assuming your data is in a NumberOfFrames X 5 dimension array and that the last dimension was the data you were looking for. If the data is in a differently shaped array, you'll need to adjust the
line so that it looks at the correct data.
ie. If your data is 5 X NumberOfFrames, the line should be
The colon tells matlab to span all the entries in that dimension and the five is specifying the dimension that contains the data you care about.
If MATLAB imports your data as a single dimension variable (Fz for instance) then you need to replace
More Answers (0)
Find more on Guidance, Navigation, and Control (GNC) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!