why my figure doesn't show the same logarithmic response like the one in the attached figure?.
1 次查看(过去 30 天)
显示 更早的评论
figure
%set(gca, 'XScale', 'log')
%set(gca, 'YScale', 'log')
ylim ([0 16])
APD=linspace(0,2);
%APD=0:0.5:2;
for ii=1:3
if ii == 1
f=25.4;
color = 'k';
style='-';
linewidth = 2;
hold on
elseif ii == 2
f=35;
color = 'b';
style = '-';
linewidth = 2;
elseif ii == 3
f=50;
color = 'g';
style = '-';
linewidth = 2;
end
phi_SAFOV = atand((APD.*10^-4)./(2*f*10^-3));
set(gca,'XTICK',[ 0 0.5 1 1.5 2 ]);
set(gca,'YTICK',[ 0 2 4 6 8 10 12 14 16 ]);
plot(APD,phi_SAFOV,'Color',color,'LineStyle',style,'linewidth',linewidth);
lgd = legend('f=25.4 mm','f=35.0 mm','f=50.0 mm','off');
end
hold off
xlabel('Surface area of PD (cm^2)')
ylabel('\oslash_v_e_r or \oslash_h_o_r (^o)')
0 个评论
采纳的回答
Dave B
2021-11-14
编辑:Dave B
2021-11-14
I'm not sure how to match the y axis values, your equation didn't have much info about DPD, but it looks to me like you're missing a sqrt (maybe because the x axis is cm^2?)
(In any case I cleaned up your code :) )
x=linspace(0,2);
f=[25.4 35 50];
phi_SAFOV = atand(sqrt(x)./(2*f'));
plot(x,phi_SAFOV,'linewidth',2);
colororder(diag([1 1 1]))
legend('f=25.4 mm','f=35.0 mm','f=50.0 mm','Location','north');
xlabel('Surface area of PD (cm^2)')
ylabel('\oslash_{ver} or \oslash_{hor} (^o)')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!