There is no way that code would run.
- It is missing an 'end' corresponding to the single 'if' statement.
- You have not given any code for your user-written function named 'If' (MATLAB is case sensitive so this is not 'if')
- You have used an assignment ('=') in your 'if' test "if i=1:64", but assignments are not permitted there
- The array "W" is use before you initialize it
- As you have not initialized "i" (remember, "if" does not permit assignments), it would have its default value of sqrt(-1) and you would then try to index arrays with that sqrt(-1) as a subscript
I recommend that you have another look at the documentation to see the difference between "if" and "for". I also recommend that you note that you cannot "for" over two different variables in the same "for" statement.