Message Boards Message Boards

GROUPS:

Create a HeavisidePi Plot

Posted 11 months ago
1486 Views
|
3 Replies
|
7 Total Likes
|

How could i change This Plot This Plot

to something like this plot  this plot

Each two plots are concatenation of HeavisidePi

The code for the first plot is :

listID1={2,0,9,4,3,9,6,7,8};
tCje[l_]:=Table[l[[n]]*HeavisidePi[x-(n+1)],{n,1,9}];
Plot[tCje[listID1],{x,0,20},Exclusions->None]
3 Replies

Could change Table to Sum.

Posted 11 months ago

Do you mean style-wise or as a probability distribution or both or something else?

If it is just about the plot, you can try:

ListStepPlot[listID1, Center]

EDIT:

The above is "sub optimal", better is:

ListStepPlot[ArrayPad[listID1, 1], Center]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract