|Original Message (ID '45117') By Bill Simpson:|
|First is a small error and will not fix your problem.
At the end of your Module you have
This should be
Next is a large error and appears to be the cause of your problem.
In your module you have
torneo[n/2]; (*here is recursive function
When you recursively call torneo[n/2] a new copy of torneo does the calculation and then returns the matrix as the value of the recursive call.
You then do nothing with this returned value, you do not use the value to update your matrix, and the result is then discarded.
You must decide how to use the value returned from the recursive call. Perhaps you want to use that returned value to modify tabla in your matrix. I cannot be certain.
Does this make it clear?
This shows an example of recursively creating smaller vectors and then joining the smaller vector to the rest of the original vector.
For a matrix it would be more complex to update the original tabla.|