I keep on getting an error when using mapObj
Mostrar comentarios más antiguos

>> k1 = M1(:,1)
>> k2 = M(:,5)
>> val1 = M1(:,2:4)
>> val2 = M1(:,6:11)
>> keyset = {k1,k2}
>> valueset = [val1,val2]
>> mapObj = containers.Map(keyset,valueset)
Error using containers.Map
Unsupported key specified. See documentation for valid key types.
I don't know how to get pass this error, I have tried using both cellfun(@str2num,k1&2); aswell as [strcat({' '}, num2str(k1&2))] to get the keys into supported key but I still get the same message. If anyone could help that would be fantastic.
Respuestas (0)
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!