That is a pretty awful MATLAB perk, using 'i' as the sqrt(-1) (and indexing the arrays from 1...).
It makes polyglot programmers make a lot of silly mistakes. It would have been SO easy to call the imaginary constant just 'I' instead of 'i'...
It makes polyglot programmers make a lot of silly mistakes. It would have been SO easy to call the imaginary constant just 'I' instead of 'i'...
i=sqrt(-1)
Sorry for the mess, hope you learn from this...'
But I keep tripping over the same stone...
Insisting on doing something, even if it's the wrong thing, is much worse in most applications than refusing to run in order to avoid producing incorrect and misleading results.