Finding the value of one column based on another column

1 回表示 (過去 30 日間)
Andrew
Andrew 2013 年 3 月 7 日
I have an (n,6) matrix where the first column is time and the 2:6 columns are cumulative sums through time. I'd like to know the time value in column 1 where the cumulative sum values in column 2:11 are equal to 0.5.
To help visualize this, I attached a figure. I'm essentially trying to find where on the x axis, each one of those distributions crosses the dashed line (at y=0.5).
Any ideas?
Sorry if some of my language is unclear...I'm neither a programmer or statistician!
Andy

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 3 月 7 日
編集済み: Azzi Abdelmalek 2013 年 3 月 7 日
[ii,jj]=find(A(:,2:6)==0.5)
out=A(ii,1)
  4 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 3 月 8 日
[min_val,ii]=min(abs(A(:,2:6)-0.5))
out=A(ii,1)
Andrew
Andrew 2013 年 3 月 8 日
That's it!
Thank you so much for your help!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by