hi, im trying to plot graph resistance against frequency. I managed to calculate the value of R, but i just get a blank graph when i tries to plot the result.Here is my codes
function [resistant ] = resistance(w,l,h)
G = 1.59*10.^-8;
u =pi*4*10.^-7;
p= 6.30 *10.^7;
f = 0:8;
for i= 0:8;
q(i+1)=(2/(2*pi*f(i+1)*u*G)).^(1/2);
v(i+1) = 1-exp(-h/q(i+1));
r(i+1)= w*q(i+1)*v(i+1);
R = p*l/r(i+1);
end
plot(f,R);
xlim([0 8]);
xlabel('frequency');
ylabel('resistance');
title('graph');
end
I hope somebody can tell me if there are any error in my codes.

 採用された回答

Walter Roberson
Walter Roberson 2018 年 3 月 12 日

0 投票

R(i+1) = p*l/r(i+1);

1 件のコメント

rose wright
rose wright 2018 年 3 月 15 日
Thanks a lot for helping

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by