Error using plot Conversion to double from sym is not possible
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
Rb=2*10^9;
syms t;
T=1/Rb;
BT=[0.25,0.3,0.4,0.5,0.6,0.7];
for ii=1:length(BT)
a=sqrt(2)*pi*BT(ii)/(T*sqrt(log(2)));
b=pi*BT(ii)/sqrt(2*log(2));
firstterm=(b/a)*(erf(a*t-b)+erf(a*t+b));
secondterm=t*(erfc(a*t-b)-erfc(a*t+b));
thirdterm=(exp(-(a*t+b).^2)-exp(-(a*t-b).^2))/(a*sqrt(pi));
phase=(pi/(2*T))*(firstterm+secondterm+thirdterm)+(pi/2);
f=-10^10:40*10^7:10^10; %-10^10:4*10^7:10^10
%**** Integration ***
p(ii,:)=int(exp(-1i*((2*pi*f*t)-phase)),t,-T,T);
q(ii,:)=int(exp(-1i*((2*pi*f*t)+phase)),t,-T,T);
sum(ii,:)=0.5*(p(ii,:)+q(ii,:));
magnitude(ii,:)=abs(sum(ii,:)); % find absolute value of complex value
sd(ii,:)=(magnitude(ii,:).^2)/T^2;
end
mn=10*log10(sd);
figure
plot(f,mn,'.-');
Antworten (0)
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!