This seems silly. Why are you using a 3 digit approximation to pi (and pi/2) here, then trying to solve for anything?
pi is already well defined in MATLAB.
format long g
pi
ans =
3.14159265358979
And pi/2 is also well defined. You write it as
pi/2
ans =
1.5707963267949
Of course, all of your other numbers are equally short, and I am sure, are not exactly values like 3.9 and 11.8.
Next, if you want results to have units of NANOMETERS, then setting tsi and tox to be on the order of 1e-9 is silly!
tox MUST have units of nanometers for your equations to make any sense at all. Therefore, tox is 1. Then x will also have units of nanometers, and it should be on the order of 1 too.
Eox = 3.9;
Esi = 11.8;
tox = 1;
tsi = 10;
x = 1:0.1:50;
So now everything will have units of nanometers. A number means something only to you. You must define the context, or a number is just a number. So if all numbers of interest are in the form of nanometers, then all is fine.
Regardless, it looks like you are trying to solve for all solutions of a problem that probably has infinitely many solutions.
So if we look for small x, then we see this plot:
ezplot(@(x) (tan(pi*tox./x).*tan(pi/2*tsi./(x)))-(3.9/11.8),[.01,2]);
ylim([-5 5])
refline(0,0)
Are you looking for the 4 largest solutions?
So if we instead re-parameterize your problem in terms of u=1/x, now looking for the smallest solutions, of infinitely many solutions, we will see this:
ezplot(@(u) (tan(pi*tox*u).*tan(pi/2*tsi*u))-(3.9/11.8),[0,.75]);
refline(0,0)
So for u=1/x no larger than 0.75 nanometers, we see the first 4 solutions, represented graphically. As x gets smaller, there will be infinitely many more solutions. But those are the possible solutions for the smallest values of u, and therefore, the largest values of x.
The difference is, when we try to plot this relation as a function of x, it gets nasty looking. Instead, things are more well behaved when we look for the smallest solutions in u, thus 1/x.