Now decode a double vector to a (hopefully!) meaningful text.
Inputs are encoded vector and key matrix.
encodedVector = [1665 1624 1541 1549 1495 1501 486 510 534 1503 1552 1595 1192 747 836]
key = magic(3);
inverse of key
inverseKey = [0.147222222222222 -0.144444444444444 0.0638888888888889
-0.0611111111111111 0.0222222222222222 0.105555555555556
-0.0194444444444445 0.188888888888889 -0.102777777777778];
Reshape encodedVector so it has the same number of rows with key
reshapedVector = [1665 1549 486 1503 1192;
1624 1495 510 1552 747;
1541 1501 534 1595 836];
Multiply inverseKey and reshapedVector, round it and reshape it;
messageVector = [109 97 116 108 97 98 32 38 32 99 111 100 121 32 32];
char equivalent of message vector is 'matlab & cody'

Solution Stats

25 Solutions

11 Solvers

Last Solution submitted on Jun 15, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...