Info

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

How to count the values before negative numbers if negative numbers appear multiple times?

1 回表示 (過去 30 日間)
Tawsif Mostafiz
Tawsif Mostafiz 2021 年 8 月 2 日
閉鎖済み: Cris LaPierre 2021 年 8 月 2 日
My output is like this:
0.2856 -0.2560 -0.2546 -0.2549 -0.3652 -0.2376 0.2469 0.2645 0.2638 0.2635 -0.6497 0.3110
0.3132 -0.7653 -0.2451 0.542 -0.987 0.143 -0.386 -0.911 -0.123
Here, Negative numbers appear 4 occations. (5 times, 1 time, 2 times and 3 times). I want to show the number of values before each
occations. For example, number of values are 13 before negative appears 2 times. The output is supposed to be like this:
1 10 13 16 18
How can I do that?

回答 (0 件)

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by