Finding the total number of zeros
5 ビュー (過去 30 日間)
古いコメントを表示
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?!
2 件のコメント
Benjamin Avants
2014 年 5 月 13 日
Can you explain a little more about what each dimension of the data is signifying?
Also, are these trials of a person jumping up off of a force plate? If so, is it just one jump? Clarify a little and I'll help you figure out what you need to do.
採用された回答
Benjamin Avants
2014 年 5 月 13 日
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.
2 件のコメント
Benjamin Avants
2014 年 5 月 13 日
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
data(:,5)
line so that it looks at the correct data.
ie. If your data is 5 X NumberOfFrames, the line should be
data(5,:)
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
data(:,5)
with
Fz(:)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!