フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I have imported data from excel and want to count the first lot of zeros in the 6th column

2 ビュー (過去 30 日間)
James Oxborrow
James Oxborrow 2018 年 1 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
the data is from a force platform and im trying to calculate jump height. to do this i need to count the number of times the force was zero, however the participant got of the force platform before the software finished recording so the data force goes back to zero at the end. i want to discount this second lot of zeros.

回答 (1 件)

Star Strider
Star Strider 2018 年 1 月 10 日
It would help to have your data.
This approach will give you the starting index of the last string of zero values:
v = [zeros(1, 10) rand(1, 20) zeros(1, 5)];
vf = fliplr(v);
[~,idx] = max(vf > 0);
LastZeroStart = numel(v) - idx + 2;
I wrote it in several lines to demonstrate how it works.

この質問は閉じられています。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by