Trouble with plotting on log scale with current data
显示 更早的评论
So I have the plot down for linear scale but when I go to use the same code for log scale, using loglog, I get an error message. I believe its from using a syms on theta.
"Data must be numeric, datetime, duration or an array convertible to double."
Was looking for some points on how to change my code to accept my data to plot on log.
syms theta
kD = 0.1:10;
x = (kD.*sin(theta));
R = (1 - ((2*besselj(1,x))./(x)));
X = ((2*besselj(1,x))./(x)) + (((2*bessely(1,x))./(x))*1i);
figure(3)
fplot(R)
axis([0 1.8 -0.2 1.2])
grid on
title('Plot of Radiation Resistance and Reactance')
hold on
fplot(real(X)+ imag(X))
axis([0 1.8 -0.2 1.2])
grid on
hold off
loglog(R)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Log Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!