im trying to plot this function, y= (exp(1i.*k.*pi./10).*(1-exp(-1i.*k.*2.*pi)))./(20.*(-1+(exp(1i.*k.*pi./10))));
3 次查看(过去 30 天)
显示 更早的评论
syms y k
y= (exp(1i.*k.*pi./10).*(1-exp(-1i.*k.*2.*pi)))./(20.*(-1+(exp(1i.*k.*pi./10))));
fplot(y)
2 个评论
Torsten
2021-12-29
Does this work ?
syms x y(x)
y(x) = (exp(1i.*x.*pi./10).*(1-exp(-1i.*x.*2.*pi)))./(20.*(-1+(exp(1i.*x.*pi./10))));
fplot(abs(y(x)),[-5 5])
回答(1 个)
Paul
2021-12-29
syms y k
y= (exp(1i.*k.*pi./10).*(1-exp(-1i.*k.*2.*pi)))./(20.*(-1+(exp(1i.*k.*pi./10))));
y is complex valued, e.g.
subs(y,k,0.1)
I'm not sure what fplot() tries to do with a complex valued function. But the real questions is what plot is desired. Perhaps the magnitude of y?
fplot(abs(y))
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!