how you need to use the zeros function. Note that array indexing in Matlab is different from Python (parentheses () rather than square brackets []. and one-based rather than zero-based). Does Matlab give the same result as Python? ONo Yes
Fig: 1
Fig: 2
Fig: 3