How to pick out the x-values for their corresponding y-values ?

2 ビュー (過去 30 日間)
Schirin Sellmann
Schirin Sellmann 2017 年 10 月 25 日
コメント済み: Darshika Gumare 2019 年 1 月 31 日
Hi, I have two 1031X1 matrices, one represents the x-, the other one the y-values for a profile graph. I need the corresponding value couples where the y-values exceed a certain RMSE. I know how to get the y-values but how do I extract the right x-values?
Thanks a lot again!

採用された回答

KSSV
KSSV 2017 年 10 月 25 日
Get the indices of y satisfying the condition, pick the x values of those indices. Simple.
x = rand(100,1) ;
y = rand(100,1) ;
%%pick x satisfying certain condition of y
idx = y>0.8 ;
iwant = [x(idx) y(idx)]
  2 件のコメント
Schirin Sellmann
Schirin Sellmann 2017 年 10 月 25 日
DOH!!!! Great, one comma too much and wrong brackets!
I send a digital huge lemoncake!!;) Thanks again!
Darshika Gumare
Darshika Gumare 2019 年 1 月 31 日
It worked!..Thank you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by