フィルターのクリア

reading element from matrix

3 ビュー (過去 30 日間)
Abdulaziz
Abdulaziz 2013 年 11 月 7 日
回答済み: Image Analyst 2013 年 11 月 7 日
Hi guys.
please u have three vector matrices where or one matrix with three columns x y n. n is the sample number. example
n=[1 1 1 2 2 2 2 3 3 4 4 4 4 4]
x=[4 5 3 2 3 6 8 3 2 1 6 7 6 8]
y=[1 2 5 6 7 8 9 5 6 7 4 3 5 5]
how can I read the values in x and y corresponding to every fixed value in n like for n=1 x=[4 5 3] y=[1 2 5]
Thanks in advance

採用された回答

Image Analyst
Image Analyst 2013 年 11 月 7 日
xOut = x(n==1);
yOut = y(n==1);
Repeat for any value of n that you want.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by