Gaps In Plot Of Piecewise Function in Matlab

Posted by eng_sub on Stack Overflow See other posts from Stack Overflow or by eng_sub
Published on 2010-12-31T04:52:22Z Indexed on 2010/12/31 4:54 UTC
Read the original article Hit count: 244

Filed under:
|
|

Hello,

I want to plot a piecewise function, but I don't want any gaps to appear

at the junctures, for example:

t=[1:8784];

b=(26.045792 + 13.075558*sin(0.0008531214*t - 2.7773943)).*((heaviside(t-2184))-(heaviside(t-7440)));

plot(b,'r','LineWidth', 1.5);grid on

there should not be any gaps appearing in the plot between the three intervals , but they do.

I want the graph to be continueous without gaps.

Any suggestions on how to achieve that.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about matlab

Related posts about gap