MATLAB Answers

store value from program and plot it

9 ビュー (過去 30 日間)
Venkatkumar M
Venkatkumar M 2020 年 1 月 14 日
コメント済み: Venkatkumar M 2020 年 1 月 31 日 16:12
w=10
s=10
h=47
er=4.7;
vo=3e8;
pi=3.14;
ss=linspace(0,50,1)
e0=8.85e12;
T=h./ss;
D=s./ss;
a1=(ss./(2*pi*e0));
a2=0.5*(2*D-1)*log(2*D-1) - (2*D-1)*log(2D+1) - 0.5*(2*D-1)*log((2*D-1).^2 + (4*T).^2) + 0.5*(2*D-1)*log((2*D-1).^2 + (4*T).^2) + T*(atan((2*D+1)/4*T)- atan((2*D-1)/4*T));
a3=a1*a2
a(4)=abs(a3)
plot(ss,a4)
xlim([0 50])
From given code ss is incremented from 0 to 50 by 1 time and it is stored
and every values of ss, a4 need to calulated and tabled
and plot must be drawn between ss and a4
could anyone please suggest some ways to do it?

  2 件のコメント

Matthias Witkowski
Matthias Witkowski 2020 年 1 月 31 日 13:44
Change ss to
ss=0:50;
and adjust all the multiplication of vectors in a2 and a3 to
.*
And dont forget to assign your result to
a4=abs(a3)
Venkatkumar M
Venkatkumar M 2020 年 1 月 31 日 16:12
Error in Untitled18 (line 12)
a2=0.5.*(2.*D-1.)*log(2*D-1) -(2.*D-1).*log(2D+1) -0.5.*(2.*D-1).*log((2.*D-1).^2 +(4.*T).^2) +0.5.*(2.*D-1).*log((2.*D-1).^2 +(4.*T).^2) + T*(atan((2.*D+1)/4.*T)-atan((2.*D-1)/4.*T));

サインイン to comment.

回答 (0 件)

サインイン してこの質問に回答します。


Translated by