This solution is outdated. To rescore this solution, sign in.
l just wonder is it a real boring thing (times table),that we need to program it,for exam.12*12=144,almost everybody who atteded high school can answer,2^10=1024;25*25=625,13*13=169;14*14=196;15*15=225;it is such an easy thing that we needn't to make a table,we can calculate it out once we see such an multiplication
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 2;
y_correct = [1 2; 2 4];
assert(isequal(timestables(x),y_correct))
|
2 | Pass |
%%
x = 5;
y_correct = [1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 16 20; 5 10 15 20 25];
assert(isequal(timestables(x),y_correct))
|
657 Solvers
Back to basics 21 - Matrix replicating
1052 Solvers
Sum the numbers on the main diagonal
453 Solvers
549 Solvers
708 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!