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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2018년 3월 12일

댓글:

2018년 3월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by