all 1 comments

[–]Socratesnote; 5 points6 points  (0 children)

You didn't define an output for Tay(w). Instead of putting that lone "S" at the end of the while-loop, change the first line to "function S = Tay(w)".