Help solving a trignometric equation
显示 更早的评论
Hi There,
I'm trying to simulate the below equation in MATLAB so that I can find Lambda (or the wavelength that is mentioned in each term in the denominator) :-

I used the following code to find it (have attached it as well in case the format is not readable) :- x=10^-9 ; %% 1 nanometer dimension t_si = 10*x ; %% silicon film thickness pi=3.14; t1= (t_si)/2; %% silicon channel t2 = 1*x; %% lower gate oxide thickness t3 = 2*x ;%% upper gate oxide thickness e1 = 11.68 ;%% permitivity of silicon channel e2= 3.9; %% permittibity of lower gate oxide e3= 21; %% permittivity of upper gate oxide (high di-electric) syms lambda; x1=(1/e1) * cot ((pi*t1)/lambda) x2 =(1/e2) * tan((pi*t2)/lambda) x3 = (1/e3) * tan ((pi*t3)/lambda) x4= (e2/(e1*e3))*tan((pi*t2)/lambda)* tan((pi*t3)/lambda) solve(x1-x2-x3-x4 == 0, lambda);
I get the following error (not sure what it means):

Would it be possible to please help me figure out what I'm doing wrong ?? I've used the SolveFunction for simpler equations and it worked out fine,but I can't figure this one out for some reason.
Many Thanks!!!
回答(3 个)
Mischa Kim
2014-3-4
Mischa, what MATLAB version are you using? Try
syms lambda real;
5 个评论
Mischa Kim
2014-3-4
编辑:Mischa Kim
2014-3-4
...and remove the semi-colon after the solve command
solve(x1-x2-x3-x4 == 0, lambda)
The semi-colon supresses showing results in the MATLAB command window. Alternatively, you could use
lam_sol = solve(x1-x2-x3-x4 == 0, lambda);
which saves the solution for lambda in a variable called lam_sol in the MALTAB workspace.
Please post follow-up questions and comments as comments, not answers.
Mischa
2014-3-4
Mischa
2014-3-4
Mischa Kim
2014-3-4
编辑:Mischa Kim
2014-3-4
I am speculating here but I think you have saved your code as a script named solve.m. If so, save it under a different name. solve() is a MATLAB function, one you are using in the script. Just to make the code is working correctly you could copy-paste it into the MATLAB command window and execute it.
类别
在 帮助中心 和 File Exchange 中查找有关 Lengths and Angles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

