We can’t correct it because you posted an image of it rather the actual code.
The solution is straightforward nevertheless — define ‘n’ before first using it!
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!