Help using besselh to plot data

Ok so I am trying to plot the Radiation Resistance and Reactance. So i used:
ka = [0.05, 0.10, 1.00, 2.50, 5.00, 7.50, 10.00];
syms theta
x = (2.*ka.*sin(theta));
R = (1 - ((2*besselj(1,x))./(x)));
fplot(R)
Which plots fine, but when i to use the one for reactance, the plot window comes up and I get a blank window and no errors.
X = ((2*besselj(1,x))./(x)) + ((j).*((2*bessely(1,x))./(x)));
or
X =@(theta) ((2*besselh(1,1,(2.*ka.*sin(theta))))./((2.*ka.*sin(theta))));
fplot(X)
Any help would be appreciated, Thank you.

 采纳的回答

MATLAB is interpreting ‘j’ here as the imaginary operator:
X = ((2*besselj(1,x))./(x)) + ((j).*((2*bessely(1,x))./(x)));
The MATLAB plot functions (including fplot) will not plot imaginary values. If you want to plot imaginary velues, use the imag function:
figure
fplot(imag(X))

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Bessel functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by