# Why Does fplot() Show a Phantom Pole?

2 views (last 30 days)

Show older comments

Example of fplot() showing a pole where clearely one does not exist. I know I can get rid of the dased line with the ShowPoles option, but that would eliminate all of the vertical lines, even for actual poles should there be any. Any idea why fplot() can't handle such a seemingly simple function?

syms t real

s(t) = piecewise(t<-1,0, t>2,0, exp(-abs(t)))

figure;

fplot(s(t),[-3 3])

##### 9 Comments

Walter Roberson
on 10 Nov 2021

### Accepted Answer

Chunru
on 8 Nov 2021

The default number of t points (23) is not big enough to show the details around t=0. Change it to a larger value.

syms t real

s(t) = piecewise(t<-1,0, t>2,0, exp(-abs(t)))

fplot(s(t),[-3 3], 'MeshDensity', 200)

### More Answers (0)

### See Also

### Community Treasure Hunt

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

Start Hunting!