Info

此问题已关闭。 请重新打开它进行编辑或回答。

How to use "fzero" command with a variable(s)?

1 次查看(过去 30 天)
JK
JK 2017-1-6
关闭: MATLAB Answer Bot 2021-8-20
format long;
lp_upper='besselj(1,x)/besselj(0,x)-besselk(1,sqrt(3.543149609311796^2-x^2))/besselk(0,sqrt(3.543149609311796^2-x^2))*sqrt(3.543149609311796^2-x^2)/x';
lpupperfrequency = fzero(lp_upper,2)
I am trying to figure out how to use a variable instead of a constant in the attached code above.
as an example, instead of using 3.543149609311796, I would like to use
lmn = 3.543149609311796;
format long;
lp_upper='besselj(1,x)/besselj(0,x)-besselk(1,sqrt(lmn^2-x^2))/besselk(0,sqrt(^2-x^2))*sqrt(lmn^2-x^2)/x';
lpupperfrequency = fzero(lp_upper,2)
when I tried that, it gives me an error.

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by