"Why do you want the result specifically to be a Matrix? You have the rows indexed by time and the columns indexed by frequency. Using a Matrix forces the number of entries to be (1 + number of times) x (1 + number of frequencies). By using a table instead of a Matrix, you wouldn't be restricted to the rectangular format; you could have separate times for each frequency."
I suppose you might be right, but I have never used the table command. Maybe you could provide a sample?
"The way that you defined S3, it is an expression, not a procedure. Yet in the Matrix command you invoke S3(k) as if it were a procedure. Consequently, the current Matrix is filled with garbage, as you'll see if you inspect a few random entries."
I am not sure about "garbage" it seems to work on my computer. All of the elements of the matrix have numerical values. Maybe something happened to the code when I uploaded it. I will download the file on this posting & check it. If something is wrong I guess I will have to resubmit my question with a new heading.
"All you're doing is numerically evaluating S3 and different values of t of k. So why isn't having a procedure S3 of parameters t and k good enough?"
It may be, but I am not familiar with what you are calling a "procedure". Maybe you can elaborate on that?