# Probability transition matrix as a function of the variance in Matlab?

I am working on Probability transition Matrix on Matlab. I Have say 5 points (states) of discretized productivity grid. I would like to have two matrix of probability transition subject to the variance. In one economy the variance is high so we can reach some extrem points and for the other a lower variance and hence we can not reach out the extrem point .

Something like this :

X =
-0.556311012781466
-0.278155506390733
0
0.278155506390733
0.556311012781466

P1 =
0.966523791407656   0.008262496944758   0.000070633393993   0.000000603821869   0.000000005161876
0.033049987779034   0.966735691589635   0.016526201533255   0.000211905343856   0.000002415287476
0.000423800363958   0.024789302299882   0.966806330145504   0.024789302299882   0.000423800363958
0.000002415287476   0.000211905343856   0.016526201533255   0.966735691589635   0.033049987779034
0.000000005161876   0.000000603821869   0.000070633393993   0.008262496944758   0.966523791407656

While

P2 =
0.1   0.008262496944758   0.000070633393993   0.000000603821869   0
0.9   0.966735691589635   0.016526201533255   0.000211905343856   0
0     0.024789302299882   0.966806330145504   0.024789302299882   0
0     0.000211905343856   0.016526201533255   0.966735691589635   0.9
0     0.000000603821869   0.000070633393993   0.008262496944758   0.1



Generally I use either a Tauchenhussey or a Rouwenhorst method to discretize my aggregate shocks. They generate automatically both the probability matrix and the grid point of states. However, in both cases the grid points state vector is also a function of the variance while the probability transition matrix is only a function of the number of grid points.

Is there any way to have a probability transition matrix as a function of the variance and the number of states?

Thank you.