我有两个向量(不同大小)在数据文件中带有字符串。 我想找到每个这些向量中两个(或更多)类似字符串的位置。 例如: -如何在matlab中查找两个或多个存储在两个不同向量中的相等字符串
a=['str1', 'str2', 'str3', 'str4', 'str5', 'str6'];
b=['str3', 'str1', 'str4', 'str4'];
我要等的输出:
b(1) corresponds to a(3)
b(2) corresponds to a(1)
b(3) corresponds to a(4)
b(4) corresponds to a(4)
这可能吗?
输出是“太多的投入” – user3270686
你运行上述所有三个命令?什么是你的Matlab版本? –
MATLAB Version 7.0.1.24704(R14)Service Pack 1,2004 – user3270686