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!