One-to-one correspondence anonymous function
3 ビュー (過去 30 日間)
古いコメントを表示
I was wondering if can make an injective (one-to-one correspondence) anonymous function to do this;
if the input was one member from P then function convert it to correspondence member in N, for example if input is x=10 out put will be y=5, x=105-->y=4 and ...
P=[10;100;105;700;943]
N=[5;8;4;11;20]
Thanks in advance, Arash
1 件のコメント
採用された回答
Azzi Abdelmalek
2013 年 2 月 10 日
編集済み: Azzi Abdelmalek
2013 年 2 月 10 日
P=[10;100;105;700;700];
N=[5;8;4;11;20];
f=@(x) N(find(P==x));
f(700)
2 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で NaNs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!