why can't i draw diagram of function abs(sin3x/sin(x/2)) in matlab?
3 次查看(过去 30 天)
显示 更早的评论
my code:
x=-pi:0.1:pi;
y=abs(sin(3*x)/sin(x/2));
plot(x,y);
0 个评论
采纳的回答
Star Strider
2017-4-13
Because you are not using element-wise division (with the ‘dot’ operator, as ‘./’).
This works:
x=-pi:0.1:pi;
y=abs(sin(3*x)./sin(x/2));
plot(x,y);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!