Check for missing argument or incorrect argument data type in call to function 'sinc'.

x = linspace(-4*pi, 4*pi, 100)
P = (3*pi)/2
plot(x, P*sinc(x) + cos(x))
grid
This is my code. I am not sure why it is showing an error.
Error:- Check for missing argument or incorrect argument data type in call to function 'sinc'.

回答(1 个)

x = linspace(-4*pi, 4*pi, 100)
P = (3*pi)/2
plot(x, P*(sin(x)./x) + cos(x))
grid
Using this instead of sinc function solved the issue.

类别

帮助中心File Exchange 中查找有关 MATLAB 的更多信息

产品

版本

R2020b

提问:

2020-10-18

回答:

2020-10-18

Community Treasure Hunt

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

Start Hunting!

Translated by