Help solving a trignometric equation
Mostra commenti meno recenti
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!!!
Risposte (3)
Mischa Kim
il 4 Mar 2014
Mischa, what MATLAB version are you using? Try
syms lambda real;
5 Commenti
Mischa Kim
il 4 Mar 2014
Modificato: Mischa Kim
il 4 Mar 2014
...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
il 4 Mar 2014
Mischa
il 4 Mar 2014
Mischa Kim
il 4 Mar 2014
Modificato: Mischa Kim
il 4 Mar 2014
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.
Mischa
il 4 Mar 2014
0 voti
Mischa
il 4 Mar 2014
0 voti
Categorie
Scopri di più su Lengths and Angles in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

