Search code examples
scilab

i'm trying to plot antenna radiation in scilab


formulla

imp=377;

c=3*10^8;

f=3*10^6;

i0=1;

teta=0:0.01:2*%pi;

lam=c/f;

l=lam/2;

k=2*%pi/lam;

r=10*lam;

ete=%iimpi0lexp(-kr)/(4%pi*r).*sin(teta);

polarplot(teta,ete); at line 56 of function polarplot ( C:\Program Files\scilab-6.1.0\modules\graphics\macros\polarplot.sci line 69 )

min: Wrong type for input argument #1: A real matrix expected.

can anyone help me to fix this?


Solution

  • Vectors given to polarplot have to be real. Maybe you are missing a call to abs to compute the modulus of ete :

    polarplot(teta,abs(ete))
    

    S.