NaN problem in my plot

1 次查看(过去 30 天)
zikos zikos
zikos zikos 2019-6-3
t=linspace(-1.5,1.5);
y=(1/(2*pi))*((exp(-t.^2)-exp(-(pi+2)*t.^2))/(t.^2)+(pi-1)*exp(-t.^2));
plot(t,erfc,'b--o')
this function for t=0 should be erfc=1, but at the plot gets the price y=3...., what's wrong

回答(1 个)

Walter Roberson
Walter Roberson 2019-6-4
You are calling the mathematical function erfc with no arguments, right after you compute y but ignore the value of y. Perhaps you intend to plot erfc(y)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by