MATLAB 帮助中心
Normalized sinc function
sinc(x)
sinc(x) returns sin(pi*x)/(pi*x). The symbolic sinc function does not implement floating-point results, only symbolic results. Floating-point results are returned by the sinc function in Signal Processing Toolbox™.
x
sin(pi*x)/(pi*x)
sinc
example
collapse all
Create a sinc function of a symbolic variable x.
syms x sinc(x)
ans = sin(π x)x π
sin(π x)x π
Show that sinc returns 1 at 0, 0 at other integer inputs, and exact symbolic values for other inputs.
1
0
V = sym([-1 0 1 3/2]); S = sinc(V)
S = (010-23 π)
(010-23 π)
Convert the exact symbolic output to high-precision floating point by using vpa.
vpa
vpa(S)
ans = (01.00-0.21220659078919378102517835116335)
Although sinc can appear in tables of Fourier transforms, fourier does not return sinc in output.
fourier
Show that fourier transforms a pulse in terms of sin and cos.
sin
cos
syms x fourier(rectangularPulse(x))
ans = sin(w2)+cos(w2) iw--sin(w2)+cos(w2) iw
sin(w2)+cos(w2) iw--sin(w2)+cos(w2) iw
Show that fourier transforms sinc in terms of heaviside.
heaviside
fourier(sinc(x))
ans = π heaviside(π-w)-π heaviside(-w-π)π
π heaviside(π-w)-π heaviside(-w-π)π
Plot the sinc function by using fplot.
fplot
syms x fplot(sinc(x))
Rewrite the sinc function to the exponential function exp by using rewrite.
exp
rewrite
syms x rewrite(sinc(x),'exp')
ans = e-π x i i2-eπ x i i2x π
e-π x i i2-eπ x i i2x π
Differentiate, integrate, and expand sinc by using the diff, int, and taylor functions, respectively.
diff
int
taylor
Differentiate sinc.
syms x diff(sinc(x))
ans = cos(π x)x-sin(π x)x2 π
cos(π x)x-sin(π x)x2 π
Integrate sinc from -Inf to Inf.
-Inf
Inf
int(sinc(x),[-Inf Inf])
ans = 1
Integrate sinc from -Inf to x.
int(sinc(x),-Inf,x)
ans = sinint(π x)π+12
sinint(π x)π+12
Find the Taylor expansion of sinc.
taylor(sinc(x))
ans = π4 x4120-π2 x26+1
π4 x4120-π2 x26+1
Prove an identity by defining the identity as a condition and using the isAlways function to check the condition.
isAlways
Prove the identity sinc(x)=1Γ(1+x) Γ(1-x).
syms x cond = sinc(x) == 1/(gamma(1+x)*gamma(1-x)); isAlways(cond)
ans = logical 1
Input, specified as a number, vector, matrix, or array, or a symbolic number, variable, array, function, or expression.
Introduced in R2018b
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处