One-to-one correspondence anonymous function
显示 更早的评论
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 个评论
Walter Roberson
2013-2-11
are your x values always integer? if not there can be a problem.
采纳的回答
更多回答(1 个)
Walter Roberson
2013-2-10
@(x) N(ismember(x, P))
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!