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!