@Carl Love It's for my scientific calculations related to the physics of superconductivity. This code and transdental equation allows me to find the behaviour of the system, namely, critical temperature (denoted by y) in a dependence of the thickness x and some internal characteristics $\tau$ and a. On the next step I should understand via matrix, where this equation has no real roots (NaN) and then, of course, as you mentioned earlier I will plot the temperature distribution as a function of the thickness and the parameter a (contour plot).
Btw since parameter a has a range from 1 to 50 this string in your code should look as
(i,j)-> R0f(i, 0 + (j-1)*(5-0)/(1000-1)),
(i,j)-> R0f(1 + (i-1)*(1-0)/(50-1), 0 + (j-1)*(5-0)/(1000-1)),
Is it correct?