Unable to plot a graph

This is the given question I was asked to plot in one of my labs.
And below is my code for MATLAB.
However, I am not getting the graph for this first, second and the third part of the question. Can someone guide me where I went wrong in my code?

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 2 月 5 日

0 投票

Here is the corrected complete code:
clearvars
syms lambda
Z_L = 25;
Z_C = 50;
z_L = Z_L/Z_C;
y=@(lambda)(Z_C*((z_L+1i*tan(2*pi./lambda))./(1+1i*z_L*tan(2*pi./lambda))));
Lam = linspace(0,2*pi, 500);
F = y(Lam);
F = abs(F);
F(isnan(F))=0;
plot(Lam, F, 'rd--', 'markerfacecolor', 'c')
grid on
xlabel('$\lambda$', 'Interpreter','latex')
ylabel('$Z_{in}(\lambda)$', 'Interpreter','latex')
title('Load Impedance at 25 \Omega')
ylim([0, 105])
xlim([0, 2*pi])

1 件のコメント

Adnan Habeb
Adnan Habeb 2023 年 2 月 6 日
Hello. Thank you for responding to my question. I want to understand something.
What does these lines do?
I want to know what is the purpose for using these lines.
F = y(Lam);
F = abs(F);
F(isnan(F))=0;
Thank you

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

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

製品

リリース

R2022a

タグ

質問済み:

2023 年 2 月 5 日

コメント済み:

2023 年 2 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by