Plotting Piecewise function produces white empty graph
Show older comments
Consider the following code :
function [X] = FourierSinc(a,b,K)
w = linspace(-10,10,600);
syms w
U = piecewise(abs(w)<a*pi,K, abs(w)>a*pi, 0);
X=exp(-1i*b*w)*U;
figure, fplot(w,X);
Taking simple values like a=2; b=4; c=3; produces a (correct) answer :
ans =
piecewise(abs(w) < 2*pi, 3*exp(-w*4i), 2*pi < abs(w), 0)
However the graph displays nothing but white and empty grid. I hope someone helps me and thank you very much!
Accepted Answer
More Answers (0)
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!