フィルターのクリア

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)')

採用された回答

Dave B
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)')
  1 件のコメント
ORION OMN
ORION OMN 2021 年 11 月 16 日
I missed the sqrt, it works well now with "ylim ([0 16])".
Thank you for your time and for cleaning my code. ^-^

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by