For a start, the algorithm on the page has two input arguments. Both are essential since they change at each recursion. Note that n is only the length of the vector on the first call of the recursion.
Then you haven't implemented swapping. Instead you delete an element. Possibly, you then try to reinsert that deleted element whose value you didn't save, but clearly v(i) = v(i) is simply a no op. Copy something into itself.
Hint: to swap element i and n:
edit: following your modifications
I do not understand why you modify the algorithm given. The algorithm has if n == 1, why do you change that to length(v)? Again, apart from the first recursion n and length(v) are not the same.
Same thing for the loop. The only thing that need to change are the bounds from 1 to n instead of 0 to n-1.
The algorithm also never deletes elements. It swaps them before and after the recursion.
Oh, and matlab is pass by value whereas the algorithm assumes pass by reference. You need to get the assign the return value of perm back to v