First: The loop with j as upper limit seems to be a bit useless. At least its not necessary to calculate pi 100 times with increasing precision. Calculate it once with max precision and then do your num2str thing.
The reason for the error is, that you are limited to numerical precison in a program, too.
So no matter how large you choose N1 to be, you will only get a result for pi with approx. 14 or 15 digits.
This result is then converted to a string with just 16 or 17 entries.
The error is when you demand to take element with indes number j+1 and j+1 is bigger than the last index in the array (max 16).
To get more decimals of pi you have a couple of choces:
Use a different algorithm which allows you to calculate specific decimals without calculating the decimals before it (spigot algorithm).
Implement your own long number arithmetic.
or use Mathcads symbolics to do the job:

Regards
Werner