I had the task to plot the computational time cost of 2 algorithms in function of the size of the matrices they solved.
What I did so far was made a method that did every algorithm x amount of times and stored the times.
In the end, I've got a matrix like such:
T =
1.248008000000027e-003 9.360059999994519e-004
7.488048000004710e-003 1.456009333332986e-002
4.992032000000109e-002 2.808017999999492e-002
1.809611600000039e-001 1.489809550000018e-001
5.740836800000352e-001 5.865637599999672e-001
4.748670439999978e+000 4.714350220000005e+000
With the first row being the computational cost of the 2 algorithms for a matrix of size 20x20, the second row the cost of the 2 algorithms for a matrix of size 40x40, then for 80x80, 160x160, 320x320 and 640x640.
The reason the 2 columns are nearly the same is because I've yet to write the second algorithm and just used the first algorithm 2 times.
What I now need to do is plot the cost of the 2 algorithms, in the same figure, in function of the increasing matrix size. I'm however stuck on the plot syntax and I keep failing in getting a pretty figure. Could anybody help?
