You lost me a bit at the end where you were doing the normalizing. Why is it: T[0], T[1] and T[3] and not T[0], T[1] and T[2]? I'm probably missing something obvious, but not seeing it.
Sorry for all the questions. Thought I'd make a variable 'b', such that in the 'for-loop', I have: " if x[i] > a*b: " My reasoning is, make the 'bump' = 0 (or any size), so the result is just a square potential-well, but the plot I'm getting doesn't look symmetric. The 'green' plot (T[3]?) has a higher peak at the far end. I won't bother you with more questions, but just thought you'd have some thoughts.
Really nice primer on this. I haven't needed to do much with matrices so this helps a lot, especially with when you're trying to 'tweak' a matrix in some way....shifting up/down, and so on. It would be good, next time you visit this topic to maybe show a comparison between the standard square well and the one with the bump for each of the [1], [2], & [3] on the same plot.