plot a function wit cos
19 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
here is my code but when i running it i get an error
f=(0:10);
%f0=5*10^9;
c=(3*10^8);
t=5*10^9;
w=2*pi*f;
wt=w*t;
k=(wt/c);
z=(0.75:30);
r12=0.29;
%x=0.094*cos*(k*z);
y=0.094*cos*(((100*pi)/3)*z);
%rin=abs(y);
plot(f,y);
xlabel("Frequency",'fontsize',5);
ylabel("|Γin|",'FontSize', 5);
title("Input reflection coefficient as a function of frequency","fontsize",7.5);
grid on;
that the errore
Error using cos
Not enough input arguments.
Error in project (line 11)
y=0.094*cos*(((100*pi)/3)*z);
i ty to fix it but tey stil have a erro at this line
0 Commenti
Risposte (2)
Torsten
il 11 Gen 2023
f=(0:10);
%f0=5*10^9;
c=(3*10^8);
t=5*10^9;
w=2*pi*f;
wt=w*t;
k=(wt/c);
z=(0.75:30);
r12=0.29;
%x=0.094*cos*(k*z);
y=0.094*cos(((100*pi)/3)*z);
%rin=abs(y);
plot(z,y);
xlabel("Frequency",'fontsize',5);
ylabel("|Γin|",'FontSize', 5);
title("Input reflection coefficient as a function of frequency","fontsize",7.5);
grid on;
Voss
il 11 Gen 2023
Maybe this
y=0.094*cos*(((100*pi)/3)*z);
should be this
y=0.094*cos(((100*pi)/3)*z);
or, without the extra parentheses:
y=0.094*cos(100*pi/3*z);
Vedere anche
Categorie
Scopri di più su Bartlett in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
