MATLAB Answers

0

what is the problem of my code it say when i run the code it show me Error in stop4 (line 17) semilogy(x,k)

Kidist Getu 님이 질문을 제출함. 14 Oct 2016
최근 활동 Walter Roberson 님이 답변함. 15 Oct 2016
a=0.0001;
l=0.003;
eo=8.85e-14;
er=11.9;
es=eo*er;
q=1.6e-19;
f=550:1650;
p=1./power(2*pi*f,2);
c=p./1;
xd=(a*es)./c;
xd1=power(xd,1.5);
l1=power(1,0.5);
a1=power(a,0.5);
es1=power(es,0.5);
k=4*pi*xd1*q*l1*q*a1*2.2*power(10,5);
nd=es1./k;
semilogy(x,k)
xlabel('xd');
ylabel('nd');
hold on % <— ADD ‘hold’
plot(x,log10(k));

  댓글 수: 0

로그인 to comment.

태그

아직 태그를 입력하지 않았습니다.

답변 수: 3

Kidist Getu 님의 답변 14 Oct 2016
Walter Roberson 님이 편집함. 15 Oct 2016

I also attached the program if ti helps

  댓글 수: 0

로그인 to comment.


Wayne King 님의 답변 14 Oct 2016
Wayne King 님이 편집함. 14 Oct 2016

Hi, you should always format your code so people can read it easier. I have formatted it for you.
You do not provide us with the x variable in your code above so we cannot diagnose the problem.
You should also report the error message you are getting.

  댓글 수: 0

로그인 to comment.


Walter Roberson 님의 답변 15 Oct 2016

Your line
semilogy(x,k)
should be
semilogy(xd,k)
Your line
plot(x,log10(k));
should be
plot(xd,log10(k));

  댓글 수: 0

로그인 to comment.



Translated by