フィルターのクリア

Empty Sym: 0-by-1 for Solve

2 ビュー (過去 30 日間)
Tom Field
Tom Field 2023 年 10 月 24 日
編集済み: Walter Roberson 2023 年 10 月 24 日
Hi there,
I'm not sure why my code returns an empty Sym:
syms beta
beta = sym('beta', 'real');
%Constants
d = 2e-6;
n_s = 1.5;
n_c = 1;
es = n_s^2;
ec = n_c^2;
c = 3e8;
lambda = 1.5e-6;
f = c/lambda;
w = 2*pi*f;
kappa = sqrt((n_s^2*w^2/c^2)-beta^2);
gamma = sqrt(beta^2-(n_s^2*w^2/c^2));
eqn = tan(kappa*d) == -kappa/gamma;
S = vpasolve(eqn, beta)
S = Empty sym: 0-by-1
Any advice would be greatly appreciated.

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 10 月 24 日
編集済み: Walter Roberson 2023 年 10 月 24 日
kappa = sqrt((n_s^2*w^2/c^2)-beta^2);
gamma = sqrt(beta^2-(n_s^2*w^2/c^2));
the expressions within the sqrt() are the negative of each other
eqn = tan(kappa*d) == -kappa/gamma;
When beta^2 > (n_s^2*w^2/c^2) then -kappa/gamma --> -1i . When beta^2 < (n_s^2*w^2/c^2) then -kappa/gamma --> 1i . When beta^2 == (n_s^2*w^2/c^2) then you have a singularity.
So you are attempting to find a beta such that tan(kappa*d) = 1i or tan(kappa*d) = -1i depending on the range of beta.
If you proceed by way of taking arctan of both sides, then providing you stay within the primary range, you get
kappa*d == atan(-1i)
%or
kappa*d == atan(1i)
but the arctan of 1i and -1i are complex infinities.
The only way to get a complex infinity out of kappa is for beta to be infinite. However, if you substitute everything in then for the left hand side, tan(kappa*d) for infinite beta, you get 1i and for the right hand side of -kappa/gamma you get -1i .
Therefore there is no solution.
  1 件のコメント
Tom Field
Tom Field 2023 年 10 月 24 日
Hmm, interesting. Thank you very much

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by