Finding the total number of zeros
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Adrienne
el 13 de Mayo de 2014
Comentada: Benjamin Avants
el 13 de Mayo de 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?!
2 comentarios
Benjamin Avants
el 13 de Mayo de 2014
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.
Respuesta aceptada
Benjamin Avants
el 13 de Mayo de 2014
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 comentarios
Benjamin Avants
el 13 de Mayo de 2014
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(:)
Más respuestas (0)
Ver también
Categorías
Más información sobre Whos en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!