I was comparing the time that the computer takes to perform Partial Pivoting, Total Pivoting and multiplying by the inverse. The code (that makes the comparison chart) is as follows:
ListPlot[{Table[
AbsoluteTiming[
SolGaussPivote[RandomReal[100, {10, 10}],
RandomReal[100, {10, 1}]]][[1]], 300],
Table[AbsoluteTiming[
SolGauss3[RandomReal[100, {10, 10}], RandomReal[100, {10, 1}]]][[
1]], 300],
Table[AbsoluteTiming[
Inverse[RandomReal[100, {10, 10}]] .
RandomReal[100, {10, 1}]][[1]], 300]}]
The chart shows that partial pivoting takes way less than time than total pivoting but it shows Inverse as it took 0 time. Where is the problem?
A=RandomReal[1,{10,10}]; First[RepeatedTiming[Inverse[A]]]I find (on my machine) that this takes about $10^{-5}$ seconds. That is not $0$. For a larger matrix, it will be more. So, what is your question? – user293787 Nov 25 '22 at 15:55SolGaussPivoteandSolGauss3defined? – Chris K Nov 25 '22 at 16:41