MATLAB编程问题

2024-11-22 07:48:57
推荐回答(1个)
回答1:

syms w n c lanmda
n=(0.6961663*lanmda^2/(lanmda^2-(0.0684043)^2)+0.4079426*lanmda^2/(lanmda^2-(0.1162414)^2)+0.8974749*lanmda^2/(lanmda^2-(9.896161)^2)+1)^0.5
w=2*pi*c/lanmda
diff(n,w,1)

不知道你想问的是不是下面的结果,程序没有问题啊,你不妨在别的电脑上试一下,这是我在我电脑上运行后得到的结果,没有出错。

n =
((3135254289267897*lanmda^2)/(4503599627370496*(lanmda^2 - 5394690650456799/1152921504606846976)) + (4041867625214373*lanmda^2)/(4503599627370496*(lanmda^2 - 6891492770885659/70368744177664)) + (7348840565394205*lanmda^2)/(18014398509481984*(lanmda^2 - 3894587022393145/288230376151711744)) + 1)^(1/2)
w =
(2*pi*c)/lanmda
ans =
diff(((3135254289267897*lanmda^2)/(4503599627370496*(lanmda^2 - 5394690650456799/1152921504606846976)) + (4041867625214373*lanmda^2)/(4503599627370496*(lanmda^2 - 6891492770885659/70368744177664)) + (7348840565394205*lanmda^2)/(18014398509481984*(lanmda^2 - 3894587022393145/288230376151711744)) + 1)^(1/2), (2*pi*c)/lanmda)