function [r,c] = qwerty_coord(key)
A={'1','2','3','4','5','6','7','8','9','0';'q','w','e','r','t','y','u','i','o','p';
'a','s','d','f','g','h','j','k','l',':';'z','x','c','v','b','n','m','','?'};
for i=1:4
for j=1:10
if A{i,j}==key;
r=i;
c=j;
break;
end
end
end
end
I'm curious: why did you include the [1 1]'s in your value set?
Hi, Heather. To be honest, this was an older version that I was using to test containers.Map, and ended up submitting by mistake.
You got the smallest answer by mistake? Cool!
That would be something, wouldn't it? The mistake was copy-pasting this version, with the [1 1]s, instead of a version without them. They are not needed, as you noticed.
3971 Solvers
Project Euler: Problem 6, Natural numbers, squares and sums.
1021 Solvers
253 Solvers
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
761 Solvers
Calculate Amount of Cake Frosting
7661 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!